#include <bits/stdc++.h>
using namespace std;
long long x, y, z, k;
long long doit() {
  long long a = 0, b = 0, c = 0, s;
  int idx;
  if (k >= x + y + z - 3) return x * y * z;
  for (int i = 0; i < k; i++) {
    idx = -1;
    if (a < x - 1 && (idx == -1 || (b + 1) * (c + 1) > s)) {
      idx = 0;
      s = (b + 1) * (c + 1);
    }
    if (b < y - 1 && (idx == -1 || (a + 1) * (c + 1) > s)) {
      idx = 1;
      s = (a + 1) * (c + 1);
    }
    if (c < z - 1 && (idx == -1 || (b + 1) * (a + 1) > s)) {
      idx = 2;
      s = (b + 1) * (a + 1);
    }
    if (idx == 0)
      a++;
    else if (idx == 1)
      b++;
    else
      c++;
  }
  return (a + 1) * (b + 1) * (c + 1);
}
int main() {
  while (scanf("%I64d%I64d%I64d%I64d", &x, &y, &z, &k) == 4)
    printf("%I64d\n", doit());
  return 0;
}
