#[allow(unused_imports)]
use std::io::{self, BufRead};
#[allow(unused_imports)]
use std::cmp::{min, max};

#[allow(dead_code)]
fn readln_to_vec<T>(buf: &mut BufRead) -> Vec<T> 
where T: std::str::FromStr,
      <T as std::str::FromStr>::Err: std::fmt::Debug
{
    let mut s = String::new();
    buf.read_line(&mut s).unwrap();
    s.split(" ")
        .map(|x| x.trim())
        .filter(|x| !x.is_empty())
        .filter_map(|x| x.parse().ok())
        .collect()
}

#[allow(dead_code)]
fn readln_to<T>(buf: &mut BufRead) -> T
where T: std::str::FromStr + std::clone::Clone,
      <T as std::str::FromStr>::Err: std::fmt::Debug
{
    readln_to_vec::<T>(buf)[0].clone()
}

#[allow(unused_macros)]
macro_rules! readln_to_tuple {
    (
        $bufRead: expr, ( $( $t: ty ),* )
    ) => (
        {
            let buf: &mut BufRead = $bufRead;
            let ln = readln_to_vec::<String>(buf);
            let mut i = ln.into_iter();
            ( $( i.next().unwrap().parse::<$t>().unwrap() ),* )
        }
        )
}


fn main() {
    let stdin = io::stdin();
    let mut stdin = stdin.lock();
    let stdin = &mut stdin;

    let (q, h, s, d) = readln_to_tuple!(stdin, (i64, i64, i64, i64));
    let n: i64 = readln_to(stdin);

    println!("{}", min(min(n * q * 4, n * h * 2), min(n * s, (n/2) * d + (n % 2) * min(min(q*4, h*2), s))));
}


