#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops")
using namespace std;
const int N = 1e5 + 2;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long x, y, z, k;
  cin >> x >> y >> z >> k;
  vector<long long> vec = {x, y, z};
  sort(vec.begin(), vec.end(), greater<long long>());
  vector<long long> cuts(3, 1);
  int pos = 0;
  long long ans = 0;
  while (k) {
    bool flag = 0;
    for (int i = int(0); i < int(3); ++i) {
      if (cuts[i] != vec[i]) flag = 1;
    }
    if (!flag) break;
    if (cuts[pos] == vec[pos]) {
      pos = (pos + 1) % 3;
      continue;
    }
    long long sum = 1;
    for (int i = int(0); i < int(3); ++i) sum *= cuts[i];
    ans += sum / cuts[pos];
    cuts[pos]++;
    pos = (pos + 1) % 3;
    k--;
  }
  cout << ans + 1 << endl;
  return 0;
}
