Q, H, S, D = list(map(int,input().split()))

N = int(eval(input()))

print((min(D,2*S,4*H,8*Q)*(N//2)+min(S,2*H,4*Q)*(N%2)))

import sys

def input():

    return sys.stdin.readline()[:-1]

def main():

    Q, H, S, D = list(map(int,input().split()))

    N = int(eval(input()))

    print(((N//2)*min(Q*8,H*4,S*2,D)+(N%2)*min(Q*4,H*2,S)))

    

if __name__ == '__main__':

    main()

Q, H, S, D = list(map(int, input().split()))
N = int(eval(input()))
print((min(D, 2 * S, 4 * H, 8 * Q) * (N // 2) + min(S, 2 * H, 4 * Q) * (N % 2)))

import sys


def input():
    return sys.stdin.readline()[:-1]


def main():
    Q, H, S, D = list(map(int, input().split()))
    N = int(eval(input()))
    print(((N // 2) * min(Q * 8, H * 4, S * 2, D) + (N % 2) * min(Q * 4, H * 2, S)))


if __name__ == "__main__":
    main()

-Q, H, S, D = list(map(int, input().split())) -N = int(eval(input())) -print((min(D, 2 * S, 4 * H, 8 * Q) * (N // 2) + min(S, 2 * H, 4 * Q) * (N % 2))) +import sys + + +def input(): +    return sys.stdin.readline()[:-1] + + +def main(): +    Q, H, S, D = list(map(int, input().split())) +    N = int(eval(input())) +    print(((N // 2) * min(Q * 8, H * 4, S * 2, D) + (N % 2) * min(Q * 4, H * 2, S))) + + +if __name__ == "__main__": +    main()