#include <bits/stdc++.h>
using namespace std;
int s[3], k, tar[3];
int main() {
  for (int i = (0); i <= (2); i++) {
    scanf("%d", &s[i]);
    s[i]--;
  }
  scanf("%d", &k);
  k = min(k, s[0] + s[1] + s[2]);
  sort(s, s + 3);
  for (int i = (0); i <= (2); i++) {
    tar[i] = k / 3;
    if (2 - i < k % 3) tar[i]++;
  }
  while (tar[0] > s[0]) {
    tar[0]--;
    if (tar[1] > tar[2])
      tar[2]++;
    else
      tar[1]++;
  }
  while (tar[1] > s[1]) {
    tar[1]--;
    tar[2]++;
  }
  printf("%lld\n", 1LL * (1 + tar[0]) * (1 + tar[1]) * (1 + tar[2]));
  return 0;
}
