#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int nx;
  long int x;
  long int y;
  long int z;
  long int px = 1;
  long int py = 1;
  long int pz = 1;
  long int k;
  cin >> x;
  cin >> y;
  cin >> z;
  cin >> k;
  long int maxk = x + y + z - 3;
  if (k > maxk) {
    nx = (long long int)x * y * z;
    cout << nx;
    return 0;
  }
  while (k - 3 >= 0) {
    if (px + 1 <= x) {
      px++;
      k--;
    }
    if (py + 1 <= y) {
      py++;
      k--;
    }
    if (pz + 1 <= z) {
      pz++;
      k--;
    }
  }
  while (k > 0) {
    if ((k - 1 >= 0) && (px + 1 <= x)) {
      px++;
      k--;
    }
    if (k == 0) break;
    if (k - 1 >= 0 && py + 1 <= y) {
      py++;
      k--;
    }
    if (k == 0) break;
    if (k - 1 >= 0 && pz + 1 <= z) {
      pz++;
      k--;
    }
    if (k == 0) break;
  }
  nx = (long long int)px * py * pz;
  cout << nx;
  return 0;
}
