open Printf
open Scanf

let () =
  let q, h, s, d = scanf "%d %d %d %d " (fun w x y z -> (w, x, y, z)) in
  let n = scanf "%d " (fun x -> x) in
  let qy = 4 * q * n and
      hy = 2 * h * n and
      sy = s * n in
  let lst = [qy; hy; sy; d * (n / 2) + (n mod 2) * 4 * q; d * (n / 2) + (n mod 2) * 2 * h; d * (n / 2) + (n mod 2) * s] in
  List.fold_left min max_int lst |> printf "%d\n"
