"use strict";

let input = require("fs").readFileSync("/dev/stdin", "utf8");
//方針
// とりあえず情報の整理
const Info = input.trim().split('\n');
let Prices = Info[0].split(" ").map(x => x*1);
let amount = Info[1]*1;
let Q = Prices[0];
let H = Prices[1];
let S = Prices[2];
let D = Prices[3];

let L1 = Math.min(Q*4, H*2,S);
let L2 = Math.min(L1*2, D);

let ans = L2 * Math.floor(amount/2) + L1 * (amount%2);

console.log(ans);