#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64377216")
using namespace std;
int main() {
  vector<int> a, b;
  int k;
  a.resize(3);
  cin >> a[0] >> a[1] >> a[2] >> k;
  b = a;
  while (true) {
    bool was = false;
    for (int i = 0; i < 3; ++i) {
      if (a[i] > 1 && k > 0) {
        --a[i];
        --k;
        was = true;
      }
    }
    if (!was) break;
  }
  long long res = 1;
  for (int i = 0; i < 3; ++i) res *= (b[i] - a[i] + 1);
  cout << res;
  return 0;
}
