# -*- coding: utf-8 -*-

q,h,s,d = list(map(int,input().split()))

n = int(eval(input()))



q = 4*q

h = 2*h



if n%2==0:

    t = q*n

    t = min(t, h*n)

    t = min(t, s*n)

    t = min(t, d*n//2)

else:

    t = q*n

    t = min(t, h*n)

    t = min(t, s*n)

    t = min(t, (n//2)*d + min(q,h,s))

print(t)

q,h,s,d = list(map(int, input().split()))

n = int(eval(input()))



q = 4*q

h = 2*h

x = min(q,h,s)



print(((n//2)*min(2*x,d)+(n%2)*x))
# -*- coding: utf-8 -*-
q, h, s, d = list(map(int, input().split()))
n = int(eval(input()))
q = 4 * q
h = 2 * h
if n % 2 == 0:
    t = q * n
    t = min(t, h * n)
    t = min(t, s * n)
    t = min(t, d * n // 2)
else:
    t = q * n
    t = min(t, h * n)
    t = min(t, s * n)
    t = min(t, (n // 2) * d + min(q, h, s))
print(t)

q, h, s, d = list(map(int, input().split()))
n = int(eval(input()))
q = 4 * q
h = 2 * h
x = min(q, h, s)
print(((n // 2) * min(2 * x, d) + (n % 2) * x))

-# -*- coding: utf-8 -*- -if n % 2 == 0: -    t = q * n -    t = min(t, h * n) -    t = min(t, s * n) -    t = min(t, d * n // 2) -else: -    t = q * n -    t = min(t, h * n) -    t = min(t, s * n) -    t = min(t, (n // 2) * d + min(q, h, s)) -print(t) +x = min(q, h, s) +print(((n // 2) * min(2 * x, d) + (n % 2) * x))