#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long int ll;
int main(){
int q,h,s,d,n;
scanf("%d%d%d%d%d",&q,&h,&s,&d,&n);
int x = min(min(8*q,4*h),min(2*s,d));
int y = min(4*q,min(2*h,s));
ll ans = (ll)n/2*x;
if(n%2==1) ans += y;
printf("%lld\n",ans);
}
./Main.cpp: In function ‘int main()’:
./Main.cpp:7:36: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d%d%d",&q,&h,&s,&d,&n);
^