#include <bits/stdc++.h>
using namespace std;
int t, n, m, cas;
long long d[7], k;
void sov() {
  sort(d, d + 3);
  long long t0, t1, t2;
  t0 = t1 = t2 = 1;
  long long minz = min(d[0] - t0, k / 3);
  t0 += minz;
  t1 += minz;
  t2 += minz;
  k -= minz * 3;
  minz = min(d[1] - t1, k / 2);
  t1 += minz;
  t2 += minz;
  k -= 2 * minz;
  minz = min(d[2] - t2, k);
  t2 += minz;
  printf("%I64d\n", t0 * t1 * t2);
}
int main(void) {
  while (scanf("%I64d%I64d%I64d%I64d", d + 0, d + 1, d + 2, &k) > 0) sov();
  return 0;
}
