process.stdin.resume();
process.stdin.setEncoding('utf8');

var g_input = '';
process.stdin.on('data', function(chunk) {
    g_input += chunk;
});

process.stdin.on('end', function() {
    Main(g_input.split(/\r?\n/));
});

function Main(input) {

    var SIZE_TYPE_NUM = 4;
    var Q = 0;
    var H = 1;
    var S = 2;
    var D = 3;
    var SIZE = [0.25, 0.5, 1, 2];

    var i = 0;
    
    var line = input[0].split(' ');
    var cost = new Array(SIZE_TYPE_NUM);
    var unitCost = new Array(SIZE_TYPE_NUM);
    var min = 100000001;
    for (i = 0; i < SIZE_TYPE_NUM; i++) {
        cost[i] = parseInt(line[i]);
        unitCost[i] = cost[i] / SIZE[i];

        if (min > unitCost[i] && i != D) {
            min = unitCost[i];
        }
    }
    var n = parseInt(input[1]);

    var totalCost = 0;
    if (min < unitCost[D]) {
        totalCost = min * n;
    }
    else {
        totalCost = (n - n % 2) * unitCost[D] + (n % 2) * min;
    }

    console.log(totalCost);
}
