use std::fmt::{Debug, Display};
use std::io::{self, Read};
use std::str::{self, FromStr};


fn solve(q: u64, h: u64, s: u64, d: u64, n: u64) -> u64 {
    let q_per_2l = 8 * q;
    let h_per_2l = 4 * h;
    let s_per_2l = 2 * s;
    let d_per_2l = d;
    let min_per_2l = *[q_per_2l, h_per_2l, s_per_2l, d_per_2l]
        .into_iter()
        .min()
        .unwrap();

    if n % 2 == 0 {
        if min_per_2l == d_per_2l {
            d * n / 2
        } else if min_per_2l == s_per_2l {
            s * n
        } else if min_per_2l == h_per_2l {
            2 * h * n
        } else {
            4 * q * n
        }
    } else {
        if min_per_2l == d_per_2l {
            let min_per_2l_ex_d = *[q_per_2l, h_per_2l, s_per_2l].into_iter().min().unwrap();
            n / 2 * d +
                if min_per_2l_ex_d == q_per_2l {
                    4 * q
                } else if min_per_2l_ex_d == h_per_2l {
                    2 * h
                } else {
                    s
                }
        } else if min_per_2l == s_per_2l {
            s * n
        } else if min_per_2l == h_per_2l {
            2 * h * n
        } else {
            4 * q * n
        }
    }
}


fn main() {
    let stdin = io::stdin();
    let mut sc = Scanner::new(stdin.lock().bytes());
    println!(
        "{}",
        solve(sc.next(), sc.next(), sc.next(), sc.next(), sc.next())
    );
}


struct Scanner<R: Read> {
    buf: Vec<u8>,
    bytes: io::Bytes<R>,
}

#[allow(dead_code)]
impl<R: Read> Scanner<R> {
    fn new(bytes: io::Bytes<R>) -> Self {
        Scanner {
            buf: Vec::with_capacity(256),
            bytes: bytes,
        }
    }

    fn next<T: FromStr>(&mut self) -> T
    where
        <T as FromStr>::Err: Debug,
    {
        self.buf.clear();
        for c in self.bytes
            .by_ref()
            .map(|c| c.unwrap())
            .skip_while(|&c| c == ' ' as u8 || c == '\n' as u8)
            .take_while(|&c| !(c == ' ' as u8 || c == '\n' as u8))
        {
            self.buf.push(c);
        }
        str::from_utf8(&self.buf).unwrap().parse().unwrap()
    }

    fn vec<T: FromStr>(&mut self, n: usize) -> Vec<T>
    where
        <T as FromStr>::Err: Debug,
    {
        (0..n).map(|_| self.next()).collect()
    }

    fn pairs<A: FromStr, B: FromStr>(&mut self, n: usize) -> Vec<(A, B)>
    where
        <A as FromStr>::Err: Debug,
        <B as FromStr>::Err: Debug,
    {
        (0..n).map(|_| (self.next(), self.next())).collect()
    }

    fn trios<A: FromStr, B: FromStr, C: FromStr>(&mut self, n: usize) -> Vec<(A, B, C)>
    where
        <A as FromStr>::Err: Debug,
        <B as FromStr>::Err: Debug,
        <C as FromStr>::Err: Debug,
    {
        (0..n)
            .map(|_| (self.next(), self.next(), self.next()))
            .collect()
    }

    fn mat<T: FromStr>(&mut self, m: usize, n: usize) -> Vec<Vec<T>>
    where
        <T as FromStr>::Err: Debug,
    {
        (0..n).map(|_| self.vec(m)).collect()
    }
}


#[allow(dead_code)]
fn print_foreach<T: Display>(answer: &[T]) {
    for x in answer {
        println!("{}", x);
    }
}


#[allow(dead_code)]
fn print_yn(answer: bool, yes: &str, no: &str) {
    println!("{}", if answer { yes } else { no });
}


#[allow(dead_code)]
fn print_or<T: Display>(answer: &Option<T>, or: &T) {
    match *answer {
        Some(ref x) => println!("{}", x),
        None => println!("{}", or),
    }
}


Measured memory_bytes: 4352