#include <bits/stdc++.h>
using namespace std;
int main() {
  long long xs[3];
  long long k;
  cin >> xs[0] >> xs[1] >> xs[2] >> k;
  sort(xs, xs + 3, less<long long>());
  long long a, b, c;
  a = min(xs[0] - 1, k / 3);
  b = min(xs[1] - 1, (k - a) / 2);
  c = min(xs[2] - 1, (k - a - b));
  cout << (a + 1) * (b + 1) * (c + 1);
  return 0;
}
