#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
int main() {
int a,b,c,d,e,v1,v2;
int s1,s2,s3,s4;
while(~scanf("%d%d%d%d%d",&a,&b,&c,&d,&e)) {
if(d<e) {
s1=(c-2*e)*(a-2*e)*d;
s2=(c-2*e)*(b-2*e)*d;
s4=(a-2*e)*(b-2*e)*d;
s3=(a*b*c)-2*s1-2*s2-2*s4;
printf("%d\n",s3);
} else {
v1=a*e*e*4+(b-2*e)*e*e*4+(c-2*e)*e*e*4;
v2=(a-2*d)*(b-2*d)*(c-2*d);
if(v2<0)v2=0;
if(v1>=v2)printf("%d\n",v1);
if(v1<v2)printf("%d\n",v2);
}
}
}