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