#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  int x, y, z, k;
  cin >> x >> y >> z >> k;
  k = min(k, (x - 1) + (y - 1) + (z - 1));
  int a, b, c;
  a = b = c = 0;
  long long Ans = 1;
  for (int i = 0; i < k; i++) {
    a++;
    a = min(a, x - 1);
    if (a + b + c <= k) {
      Ans = max(Ans, (long long)(a + 1) * (long long)(b + 1) * (c + 1));
    }
    b++;
    b = min(b, y - 1);
    if (a + b + c <= k) {
      Ans = max(Ans, (long long)(a + 1) * (long long)(b + 1) * (c + 1));
    }
    c++;
    c = min(c, z - 1);
    if (a + b + c <= k) {
      Ans = max(Ans, (long long)(a + 1) * (long long)(b + 1) * (c + 1));
    }
  }
  cout << Ans << endl;
  return 0;
}
