fun main(args: Array<String>){
    var (q, h, s, d) = readLine()!!.split(" ").map(String::toLong)
    val n = readLine()!!.toLong()
    h = Math.min(q * 2, h)
    s = Math.min(h * 2, s)
    d = Math.min(s * 2, d)
    println((d * (n / 2)) + (s * (n % 2)))
}
