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

icetea q h s d n = div n 2 * l2 + mod n 2 * l1
  where
    l1 = min s (min (2*q) h * 2)
    l2 = min (l1 * 2) d