#include <bits/stdc++.h>
using namespace std;
template <typename S, typename T>
void fill_(S& buf, const T& x) {
  fill_n(reinterpret_cast<T*>(&buf), sizeof(buf) / sizeof(T), x);
}
template <typename T, int N>
inline int countof(const T (&)[N]) {
  return N;
}
template <typename T>
inline vector<T>& operator+=(vector<T>& ret, const T& x) {
  ret.push_back(x);
  return ret;
}
long long K;
long long xs[3], ys[3];
int main(int argc, char* argv[]) {
  for (int i = int(0), CNT_i = int(3); i < CNT_i; ++i) cin >> xs[i];
  sort(xs, xs + 3, greater<long long>());
  cin >> K;
  long long l = 0, r = K + 1;
  while (r - l > 1) {
    long long m = (l + r) / 2;
    long long acc = 0;
    for (int i = int(0), CNT_i = int(3); i < CNT_i; ++i)
      acc += min(m, xs[i] - 1);
    if (acc <= K)
      l = m;
    else
      r = m;
  }
  for (int i = int(0), CNT_i = int(3); i < CNT_i; ++i) {
    ys[i] = min(l, xs[i] - 1);
    K -= ys[i];
    ++ys[i];
  }
  bool modified = true;
  while (modified) {
    modified = false;
    for (int i = int(0), CNT_i = int(3); i < CNT_i; ++i)
      if (ys[i] < xs[i] && K > 0) {
        ++ys[i];
        --K;
        modified = true;
      }
  }
  cout << ys[0] * ys[1] * ys[2] << endl;
  return 0;
}
