#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <stack>
#include <vector>
#include <string>
#include <iostream>
#include <list>
#include <cstdlib>
#include <bitset>
#define lowbit(x) (x&(-x))
#define lson root<<1,l,mid
#define rson root<<1|1,mid+1,r
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
const int inf = 0x3f3f3f3f;
using namespace std;
int main()
{
long long a, b, c, d, e;
while (~scanf("%lld%lld%lld%lld%lld", &a, &b, &c, &d, &e))
{
long long ans;
long long t = e * 2;
if (d < e)
{
ans = a * b * c;
ans -= d * (a - t) * (b - t) * 2;
ans -= d * (b - t) * (c - t) * 2;
ans -= d * (a - t) * (c - t) * 2;
}
else
{
if (2 * d >= a || 2 * d >= b || 2 * d >= c)
{
ans = e * e * (c - t + a - t + b - t) * 4;
ans += e * e * e * 8;
}
else
{
ans = max(e * e * (c - t + a - t + b - t) * 4 + e * e * e * 8, (a - d * 2) * (b - d * 2) * (c - d * 2));
}
}
printf("%lld\n", ans);
}
// system("pause");
}