#include <bits/stdc++.h>
using namespace std;
void loadData(void);
long long proc(void);
void printRes(long long);
long long s[3], k;
bool lyb_debug = false;
int main(int argc, char** argv) {
  loadData();
  printRes(proc());
  return 0;
}
long long proc(void) {
  sort(s, s + 3);
  long long res;
  if (k <= (long long)((long long)3 * (s[0] - (long long)1))) {
    long long aver = k / (long long)3;
    if (k % (long long)3 == (long long)0)
      res =
          (aver + (long long)1) * (aver + (long long)1) * (aver + (long long)1);
    else if (k % (long long)3 == (long long)1)
      res =
          (aver + (long long)2) * (aver + (long long)1) * (aver + (long long)1);
    else
      res =
          (aver + (long long)2) * (aver + (long long)2) * (aver + (long long)1);
  } else if (k <= (long long)((s[0] - (long long)1) + (s[1] - (long long)1) +
                              (s[1] - (long long)1))) {
    k -= (long long)(s[0] - (long long)1);
    if (lyb_debug) {
      cout << "in level 2: " << k << " left\n";
    }
    long long aver = k / (long long)2;
    if (k % (long long)2 == (long long)0)
      res = s[0] * (aver + (long long)1) * (aver + (long long)1);
    else
      res = s[0] * (aver + (long long)2) * (aver + (long long)1);
  } else {
    k -= (long long)(s[0] + s[1] - (long long)2);
    if (lyb_debug) {
      cout << "in level 3: " << k << " left\n";
    }
    if (k <= s[2] - (long long)1)
      res = s[0] * s[1] * (k + (long long)1);
    else
      res = s[0] * s[1] * s[2];
  }
  return res;
}
void loadData(void) {
  cin >> s[0] >> s[1] >> s[2] >> k;
  return;
}
void printRes(long long res) {
  cout << res << endl;
  return;
}
