#include <bits/stdc++.h>
using namespace std;
int testnum;
int x, y, z, k;
void preprocess() {}
void solve() {
  long long xx, yy, zz;
  xx = min(x, min(y, z));
  zz = max(x, max(y, z));
  yy = x + y + z - xx - zz;
  long long a = k / 3;
  if (a < xx) {
    k -= a;
  } else {
    a = xx - 1;
    k -= a;
  }
  long long b = k / 2;
  if (b < yy) {
    k -= b;
  } else {
    b = yy - 1;
    k -= b;
  }
  long long c = k;
  if (c < zz) {
    k -= c;
  } else {
    c = zz - 1;
    k -= c;
  }
  long long ans = (a + 1) * (b + 1) * (c + 1);
  cout << ans << endl;
}
bool input() {
  scanf("%d", &x);
  scanf("%d", &y);
  scanf("%d", &z);
  scanf("%d", &k);
  return true;
}
int main() {
  preprocess();
  int T = 1;
  for (testnum = 1; testnum <= T; testnum++) {
    if (!input()) break;
    solve();
  }
}
