#include <bits/stdc++.h>
using namespace std;
const int M = 1000 + 5;
long long int ans[3];
int main() {
  long long int x[3];
  long long int k;
  for (int i = 0; i < 3; i++) {
    cin >> x[i];
  }
  cin >> k;
  sort(x, x + 3);
  int num = 0;
  for (int j = 0; j < 3; j++) {
    if (ans[j] < x[j] - 1) {
      num++;
    }
  }
  while (num > 0 && k > 0) {
    long long int ave = k / num;
    long long int res = k % num;
    if (ave == 0) {
      while (res > 0 && num > 0) {
        for (int j = 0; j < 3; j++) {
          if (ans[j] < x[j] - 1 && res > 0) {
            ans[j]++;
            if (ans[j] == x[j] - 1) {
              num--;
            }
            res--;
            k--;
          }
        }
      }
    } else {
      for (int j = 0; j < 3; j++) {
        if (ans[j] < x[j] - 1) {
          if (ans[j] + ave >= x[j] - 1) {
            k = k - (x[j] - 1 - ans[j]);
            ans[j] = x[j] - 1;
            num--;
          } else {
            k = k - ave;
            ans[j] = ans[j] + ave;
          }
        }
      }
    }
  }
  long long int result = 1;
  for (int i = 0; i < 3; i++) {
    result = result * (ans[i] + 1);
  }
  cout << result << endl;
  return 0;
}
