#include <bits/stdc++.h>
using namespace std;
long long answer;
long long total[3];
int main() {
  long long x, y, z, cuts;
  long long dim[3];
  cin >> dim[0] >> dim[1] >> dim[2] >> cuts;
  --dim[0];
  --dim[1];
  --dim[2];
  sort(dim, dim + 3);
  int kill = dim[0];
  dim[0] = dim[2];
  dim[2] = kill;
  int pos = 0;
  int mod = 3;
  for (long long i = 0; i < cuts; ++i) {
    if (dim[pos] > 0) {
      ++total[pos];
      --dim[pos];
    } else {
      --mod;
      --i;
      if (mod == 0) {
        break;
      }
    }
    pos = (pos + 1) % mod;
  }
  long long q = (total[0] + 1) * (total[1] + 1) * (total[2] + 1);
  cout << q << "\n";
}
