main :: IO ()
main = do
  [q,h,s,d] <- fmap read . words <$> getLine :: IO [Int]
  n <- readLn :: IO Int
  let base = minimum [q * 4 , q * 2 + h , h * 2, s]
  let dob = min d (2 * base)
  print $ (n `div` 2) * dob + (if odd n then base else 0)
