#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
const int logn = 10;
const int inf = (int)2e9;
const long long mod = (int)1e9 + 7;
const long long base = 2204234849;
const long long l_inf = (long long)4e18;
const long double pi = acos(-1.0);
const long double eps = 1e-12;
int x[3], k;
long long ans = 0;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  srand(566);
  cin >> x[0] >> x[1] >> x[2] >> k;
  k = min(k, x[0] + x[1] + x[2] - 3);
  sort(x, x + 3);
  for (int i = 1; i <= min(k + 1, x[0]); i++) {
    int j = k - i + 1;
    int a = j / 2, b = (j + 1) / 2;
    if (a + b > x[1] + x[2] - 2) continue;
    if (a < x[1] && b < x[2]) {
      ans = max(ans, 1ll * i * (a + 1) * (b + 1));
      continue;
    }
    b += a - x[1] + 1;
    a -= a - x[1] + 1;
    ans = max(ans, 1ll * i * (a + 1) * (b + 1));
  }
  cout << ans;
  return 0;
}
