{-# LANGUAGE BangPatterns #-}
import Control.Applicative((<$>))
import Control.Monad
import Data.Map ((!))
import qualified Data.Map as M
import qualified Data.List as L
import Data.Maybe (catMaybes)
-- import qualified Data.Char as C
-- import qualified Data.IntSet as I
import Debug.Trace
--------------------------------------------
readInt    = read :: String -> Int
getInt     = readInt <$> getLine
getIntList = map readInt . words <$> getLine
int2bin 0 =  []
int2bin n =  n `mod` 2 : int2bin (n `div` 2)
----------------------------------------------

main :: IO ()
main = do
  [q,h,s,for2] <- getIntList
  n <- getInt
  let for05 = min (2*q) h
      for1  = min (2*for05) s
  if for1*2 <= for2 then
    print (n*for1)
  else
    let (sho,amari) = n `quotRem` 2
    in print $ sho*for2 + amari*for1
