#include <bits/stdc++.h>
int main() {
  int a[3], b[3], k;
  scanf("%d%d%d%d", a, a + 1, a + 2, &k);
  std::sort(a, a + 3);
  b[0] = std::min(k / 3, a[0] - 1);
  k -= b[0];
  b[1] = std::min(k / 2, a[1] - 1);
  k -= b[1];
  b[2] = std::min(k, a[2] - 1);
  printf("%I64d\n", (long long)(b[0] + 1) * (b[1] + 1) * (b[2] + 1));
  return 0;
}
