#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int x, y, z, k, ans, m, n, p;
  cin >> x >> y >> z >> k;
  if ((x + y + z - 3) <= k) {
    ans = x * y * z;
  } else {
    int v[3];
    v[0] = x;
    v[1] = y;
    v[2] = z;
    sort(v, v + 3);
    if (v[0] > (k / 3)) {
      m = k / 3;
      if (k % 3 == 0) {
        n = k / 3;
        p = k / 3;
      } else if (k % 3 == 1) {
        n = k / 3;
        p = 1 + k / 3;
      } else {
        n = 1 + k / 3;
        p = 1 + k / 3;
      }
    } else {
      m = v[0] - 1;
      k = k - m;
      if (v[1] > k / 2) {
        n = k / 2;
        p = k - n;
      } else {
        n = v[1] - 1;
        p = k - n;
      }
    }
    ans = (1 + m) * (1 + n) * (1 + p);
  }
  cout << ans << endl;
  return 0;
}
