fun main(args : Array<String>) {
    val (q, h, s, d) = readLine()!!.split(" ").map { it.toInt() }
    val n = readLine()!!.toInt()

    val q2 = 8*q
    val h2 = 4*h
    val s2 = 2*s
    val d2 = d

    val q1 = 4*q
    val h1 = 2*h
    val s1 = s

    val min1 = Math.min(Math.min(q1, h1), s1)
    val min2 = Math.min(Math.min(q2, h2), Math.min(s2, d2))

    println((n / 2) * min2.toLong() + (n % 2) * min1.toLong())
}