module Main where
import Data.List

int = read::String -> Int
main = interact $ printer . solver . parser

printer = unlines . (:[]) . show
parser = map int . words

solver :: [Int] -> Int
solver [q,h,s,d,n] = result
  where
    q4 = q * 4
    h2 = h * 2
    sbest = minimum [q4, h2, s]
    result = 
      if sbest * 2 < d 
      then n * sbest 
      else d * (n `div` 2) + sbest * (n `mod` 2)

