#include <bits/stdc++.h>
using namespace std;
long long x[3], k;
int main() {
  cin >> x[0] >> x[1] >> x[2] >> k;
  sort(x, x + 3);
  long long i, j, l;
  i = min(x[0] - 1, k / 3);
  k -= i;
  j = min(x[1] - 1, k / 2);
  k -= j;
  l = min(x[2] - 1, k);
  cout << (i + 1) * (j + 1) * (l + 1) << endl;
  return 0;
}
