#include <stdio.h>
inline long long min(long long a, long long b)
{
if (a<b) return a;
else return b;
}
int main(void)
{
int Q, H, S, D;
long long N, sum;
scanf("%d%d%d%d", &Q, &H, &S, &D);
scanf("%ld", &N);
long long n2L = N/2;
long long n1L = N%2;
long long s1L = 4*Q;
s1L = min(s1L, 2*H);
s1L = min(s1L, S);
long long s2L = s1L*2;
s2L = min(s2L, D);
sum = s2L*n2L + s1L*n1L;
printf("%ld\n", sum);
return 0;
}
./Main.cpp: In function ‘int main()’:
./Main.cpp:16:20: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 2 has type ‘long long int*’ [-Wformat=]
scanf("%ld", &N);
^
./Main.cpp:31:24: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘long long int’ [-Wformat=]
printf("%ld\n", sum);
^
./Main.cpp:15:38: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d%d", &Q, &H, &S, &D);
^
./Main.cpp:16:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%ld", &N);
^