#include <bits/stdc++.h>
using namespace std;
long long x, y, z, mx, my, mz, k;
int main() {
  cin >> x >> y >> z >> k;
  int t;
  if (x > y) {
    t = x;
    x = y;
    y = t;
  }
  if (x > z) {
    t = x;
    x = z;
    z = t;
  }
  if (y > z) {
    t = y;
    y = z;
    z = t;
  }
  long long rs;
  mx = (k + 2) / 3;
  if (mx >= x) mx = x - 1;
  my = (k - mx + 1) / 2;
  if (my >= y) my = y - 1;
  mz = k - mx - my;
  if (mz >= z) mz = z - 1;
  mx++;
  my++;
  mz++;
  cout << (mx * my * mz);
}
