
object MainKt {
  @JvmStatic fun main(args:Array<String>) {
    val (Q,H,S,D) = readLine()!!.split(" ").map(String::toLong)
    val N=readLine()!!.toLong()

    val equiv_value=arrayOf(Q,H,S,D).zip(arrayOf(8,4,2,1)).map {
      val (v,r)=it
      v*r
    }
    println(equiv_value.min()!!*(N/2)+if(N%2==0L) {0} else {equiv_value.slice(0..2).min()!!/2})
  }
}
