#include <bits/stdc++.h>
using namespace std;
long long x, y, z, k, res1 = 0, res2 = 0, res3 = 0;
int main() {
  cin >> x >> y >> z >> k;
  k = min(k, x + y + z - 3);
  --x;
  --y;
  --z;
  while (k) {
    int num = -1;
    long long ch = -1;
    if (x) {
      if (ch == -1) {
        ch = res1;
        num = 1;
      } else {
        if (ch > res1) {
          ch = res1;
          num = 1;
        }
      }
    }
    if (y) {
      if (ch == -1) {
        ch = res2;
        num = 2;
      } else {
        if (ch > res2) {
          ch = res2;
          num = 2;
        }
      }
    }
    if (z) {
      if (ch == -1) {
        ch = res3;
        num = 3;
      } else {
        if (ch > res3) {
          ch = res3;
          num = 3;
        }
      }
    }
    if (num == 1) {
      ++res1;
      --x;
      --k;
    }
    if (num == 2) {
      ++res2;
      --y;
      --k;
    }
    if (num == 3) {
      ++res3;
      --z;
      --k;
    }
  }
  cout << (res1 + 1) * (res2 + 1) * (res3 + 1);
  return 0;
}
