#include <bits/stdc++.h>
using namespace std;
long long n, k, m, dai, dem, vt, ck, max1, min1, kq, tong, dd;
long long d[333];
long long x, y, z;
void sol() {
  long long i, j;
  if (k == 0) {
    cout << "1\n";
    return;
  }
  if (x + y + z <= k) {
    cout << x * y * z << endl;
    return;
  }
  j = x + y + z - 3;
  d[0] = x;
  d[1] = y;
  d[2] = z;
  for (i = k; i < j; i++) {
    sort(d, d + 3);
    d[2]--;
  }
  x = d[0];
  y = d[1];
  z = d[2];
  cout << x * y * z << endl;
}
int main() {
  int i, j;
  while (scanf("%I64d %I64d %I64d %I64d", &x, &y, &z, &k) > 0) {
    sol();
  }
  return 0;
}
