#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-8;
template <class T>
T sqr(T x) {
  return x * x;
}
int gcd(int a, int b) { return (b == 0) ? a : gcd(b, a % b); }
int main(int argc, char** argv) {
  int x[3], k;
  scanf("%d%d%d%d", &x[0], &x[1], &x[2], &k);
  sort(x, x + 3);
  --x[0];
  --x[1];
  --x[2];
  int sum = k;
  int ta = sum / 3;
  long long ans = 0;
  if (x[0] < ta) ta = x[0];
  ans = ta + 1;
  sum -= ta;
  int tb = sum / 2;
  if (x[1] < tb) tb = x[1];
  ans *= tb + 1;
  sum -= tb;
  int tc = sum;
  if (x[2] < tc) tc = x[2];
  ans *= tc + 1;
  cout << ans << endl;
  return (EXIT_SUCCESS);
}
