fun main(args: Array<String>) {
    val (q, h, s, d) = readLine()!!.split(" ").map(String::toLong)
    val n = readLine()!!.toLong()
    val cost1 = listOf(4 * q, 2 * h, s).min()!!
    val cost2 = listOf(cost1 * 2, d).min()!!
    val ans = if (n % 2 == 0L) cost2 * (n / 2) else cost2 * (n / 2) + cost1
    println(ans)
}