#include <bits/stdc++.h>
using namespace std;
const int inf = 1999999999;
const double pi = acos(-1.0);
const double eps = 1e-10;
char gc() {
  char c;
  while (isspace(c = getchar()))
    ;
  return c;
}
int gs(char* s) {
  gets(s);
  int l = strlen(s);
  while (l && isspace(s[l - 1])) s[--l] = 0;
  return l;
}
int main() {
  int d[3], k;
  cin >> d[0] >> d[1] >> d[2] >> k;
  int c[3];
  c[0] = 1;
  c[1] = 1;
  c[2] = 1;
  int tc = 0;
  for (int i = 0; tc < k && i < 3000000; i++) {
    int t = (i % 3);
    if (c[t] < d[t]) {
      c[t]++;
      tc++;
    }
  }
  cout << (long long)c[0] * c[1] * c[2];
}
