#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long int a[3], k, b[3] = {0}, avg, t;
  bool n[3] = {0};
  cin >> a[0] >> a[1] >> a[2] >> k;
  for (int i = 0; i < 3; i++) a[i]--;
  if (a[0] + a[1] + a[2] <= k) {
    cout << (a[0] + 1) * (a[1] + 1) * (a[2] + 1) << endl;
    return 0;
  }
  for (int i = 0; i < 2; i++)
    for (int j = i; j < 2; j++)
      if (a[j] > a[j + 1]) {
        t = a[j];
        a[j] = a[j + 1];
        a[j + 1] = t;
      }
  avg = k / 3;
  int c = 3;
  for (int i = 0; i < 3; i++)
    if (a[i] < avg) {
      b[i] = a[i];
      k -= a[i];
      c--;
      n[i] = 1;
    }
  if (c != 0) {
    avg = k / c;
    for (int i = 0; i < 3; i++)
      if (!n[i]) {
        if (a[i] >= avg) {
          b[i] = avg;
          k -= avg;
        } else {
          b[i] = a[i];
          k -= a[i];
        }
        c--;
        if (c != 0) avg = k / c;
      }
  }
  cout << (b[0] + 1) * (b[1] + 1) * (b[2] + 1) << endl;
}
