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

n=int(eval(input()))

s=min(4*q,2*h,s)

if d<2*s:

    if n%2==0:

        print((d*(n//2)))

    else:

        print((d*(n//2)+s))

else:

    print((n*s))

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

n=int(eval(input()))

h=min(2*q,h)

s=min(2*h,s)

if 2*s<d:

    print((n*s))

else:

    cnt=n%2

    cnt_2=n//2

    print((cnt_2*d+cnt*s))

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

q, h, s, d = list(map(int, input().split()))
n = int(eval(input()))
h = min(2 * q, h)
s = min(2 * h, s)
if 2 * s < d:
    print((n * s))
else:
    cnt = n % 2
    cnt_2 = n // 2
    print((cnt_2 * d + cnt * s))

-s = min(4 * q, 2 * h, s) -if d < 2 * s: -    if n % 2 == 0: -        print((d * (n // 2))) -    else: -        print((d * (n // 2) + s)) +h = min(2 * q, h) +s = min(2 * h, s) +if 2 * s < d: +    print((n * s)) -    print((n * s)) +    cnt = n % 2 +    cnt_2 = n // 2 +    print((cnt_2 * d + cnt * s))