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

    val oneL = listOf(q*4, h*2, s).min()!!
    val twoL = listOf(oneL*2, d).min()!!

    var ans = (n/2)*twoL
    if(n%2!=0L) {
        ans+=oneL
    }
    println(ans)
}
