main = do
  [q,h,s,d] <- map read.words<$>getLine
  n <- readLn
  print $ solve q h s d n

solve q h s d n
  | d < one*2 = d * (n`div`2) + one * (n`mod`2)
  | otherwise = one * n
  where one = minimum [s,h*2,q*4]