#include <bits/stdc++.h>
using namespace std;
long long x[3], cx[3];
int main() {
  long long k;
  for (int i = 0, t2; i < 3; ++i) {
    x[i] = 0LL;
    cx[i] = 0LL;
  }
  cin >> x[0] >> x[1] >> x[2] >> k;
  if (k >= x[0] + x[1] + x[2] - 3) {
    cout << x[0] * x[1] * x[2] << endl;
  } else {
    sort(x, x + 3);
    long long temp;
    while (k > 0) {
      if (k >= 3)
        temp = k / 3;
      else
        temp = 1;
      for (int i = 0, t2; i < 3; ++i) {
        t2 = min(temp, x[i] - 1 - cx[i] >= 0 ? x[i] - 1 - cx[i] : 0LL);
        cx[i] += t2;
        k -= t2;
        if (k <= 0) break;
      }
    }
    cout << (cx[0] + 1) * (cx[1] + 1) * (cx[2] + 1) << endl;
  }
  return 0;
}
