#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long x, y, z, k, xx, yy, zz;
  cin >> x >> y >> z >> k;
  if (x > y) swap(x, y);
  if (x > z) swap(x, z);
  if (y > z) swap(y, z);
  xx = min(x - 1, k / 3);
  k -= xx;
  yy = min(y - 1, k / 2);
  k -= yy;
  zz = min(z - 1, k);
  cout << (xx + 1) * (yy + 1) * (zz + 1) << endl;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  t = 1;
  while (t--) solve();
}
