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