#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, y, z, k;
  cin >> x >> y >> z >> k;
  long long Max = std::max(x, std::max(y, z));
  long long Min = std::min(x, std::min(y, z));
  long long Avg = x + y + z - Max - Min;
  long long ansX = k / 3;
  if (ansX >= Min) {
    ansX = Min - 1;
  }
  k -= ansX;
  long long ansY = k / 2;
  if (ansY >= Avg) {
    ansY = Avg - 1;
  }
  k -= ansY;
  if (k >= Max) {
    k = Max - 1;
  }
  cout << (ansX + 1) * (ansY + 1) * (k + 1) << endl;
  return 0;
}
