#include<stdio.h>
#include<math.h>
int main(void){
int a,b,c,d,e,v1,v2,max;
while(scanf("%d%d%d%d%d",&a,&b,&c,&d,&e)!=EOF){
if(d>=e){
v1=a*b*c-((a-2*e)*(b-2*e)+(a-2*e)*(c-2*e)+(c-2*e)*(b-2*e))*2*e-(a-2*e)*(b-2*e)*(c-2*e);
v2=(a-2*d)*(b-2*d)*(c-2*d);
if(v1>v2)
max=v1;
else
max=v2;
}
else{
max=a*b*c-2*(a-2*e)*(b-2*e)*d-2*(a-2*e)*(c-2*e)*d-2*(c-2*e)*(b-2*e)*d;
}
printf("%d\n",max);
}
return 0;
}