#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, z, k;
  scanf("%d%d%d%d", &x, &y, &z, &k);
  int sum = x + y + z - 3;
  if (k >= sum) {
    printf("%I64d\n", ((long long)(x)) * y * z);
  } else {
    int m;
    long long cx, cy, cz;
    cx = cy = cz = 1;
    int id = 1;
    while (k--) {
      if (id == 1) {
        if (cx < x) {
          cx++;
        } else {
          k++;
        }
        id = 2;
      } else if (id == 2) {
        if (cy < y) {
          cy++;
        } else {
          k++;
        }
        id = 3;
      } else {
        if (cz < z) {
          cz++;
        } else {
          k++;
        }
        id = 1;
      }
    }
    printf("%I64d\n", cx * cy * cz);
  }
}
