#include <bits/stdc++.h>
using namespace std;
int main() {
  long long k, i, j;
  vector<long long> x, cuts(3, 0);
  for (int i = 0; i < 3; ++i) {
    int f;
    cin >> f;
    x.push_back(f);
  }
  cin >> k;
  sort(x.begin(), x.end());
  j = 0;
  while (k) {
    if (cuts[0] == x[0] - 1 && cuts[1] == x[1] - 1 && cuts[2] == x[2] - 1)
      break;
    if (cuts[j] < x[j] - 1) {
      cuts[j]++;
      k--;
    }
    j = (j + 1) % 3;
  }
  cout << (cuts[0] + 1) * (cuts[1] + 1) * (cuts[2] + 1) << "\n";
  return 0;
}
