import Control.Applicative
import qualified Data.ByteString.Char8 as BS
import Data.Maybe

readIntBS = fst . fromJust . BS.readInt

main = do
  [q,h,s,d] <- map (fromIntegral . readIntBS) . BS.words <$> BS.getLine :: IO [Integer]
  n <- readLn :: IO Integer

  print $ (n`div`2) * (minimum [q*8,h*4,s*2,d]) + (n`mod`2) * (minimum [q*4,h*2,s])
