main = do
  [q, h, s, d] <- map read . words <$> getLine
  n <- readLn
  let md = minimum [8 * q, 4 * h, 2 * s, d]
  let ms = minimum [4 * q, 2 * h, s]
  print $ solve md ms n

solve md ms 0 = 0
solve md ms 1 = ms
solve md ms n = p * md + solve md ms r
  where (p, r) = n `divMod` 2