#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x[3], k, dx, dy, dz, res;
  cin >> x[0] >> x[1] >> x[2] >> k;
  sort(x, x + 3);
  dz = min(k / 3, x[0] - 1);
  dy = min((k - dz) / 2, x[1] - 1);
  dx = min(k - dz - dy, x[2] - 1);
  res = (dx + 1) * (dy + 1) * (dz + 1);
  cout << res << endl;
  return 0;
}
