fun main(args: Array<String>) {
    val (q, h, s, d) = readLine()!!.split(" ").map { Integer.parseInt(it).toLong() }
    val n: Long = Integer.parseInt(readLine()!!).toLong()
    val first = listOf(q*8, h*4, s*2, d).withIndex().minBy{it.value}!!.index
    if (first == 3) {
        val second = listOf(q*4, h*2, s).withIndex().minBy{it.value}!!.index
        println((n / 2) * d + (n % 2) * listOf(q*4, h*2, s)[second])
    } else {
        println(listOf(q*4, h*2, s)[first] * n)
    }
}