program main
	implicit none
	integer(8) :: Q, H, S, D, N
	
	read(*, *) Q, H, S, D
	read(*, *) N
	
	if(mod(N,2) == 0) then
		Q = 8*Q
		H = 4*H
		S = 2*S
		write(*, *) N/2 * min(Q,H,S,D)
	else
		Q = min(2*H,4*Q,S)
		write(*, *) min(N*Q,N/2 * D+Q)
	end if
end program main