#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, z, k;
  scanf("%d%d%d%d", &x, &y, &z, &k);
  if (x > y) swap(x, y);
  if (x > z) swap(x, z);
  if (y > z) swap(y, z);
  long long ans = 1;
  int cut;
  cut = k <= (x - 1) * 3 ? k / 3 : x - 1;
  ans *= cut + 1;
  k -= cut;
  if (k > 0) {
    cut = k <= (y - 1) * 2 ? k / 2 : y - 1;
    ans *= cut + 1;
    k -= cut;
  }
  if (k > 0) {
    cut = k <= z - 1 ? k : z - 1;
    ans *= cut + 1;
  }
  cout << ans;
}
