#include <bits/stdc++.h>
using namespace std;
int main() {
  long long arr[] = {0, 0, 0};
  long long k = 0, diff = 0;
  long long min = 0, k3 = 0, ostatok = 0;
  long long result = 0;
  for (long long i = 0; i < 3; i++) cin >> arr[i];
  cin >> k;
  sort(arr, arr + 3);
  long long x = 0, y = 0, z = 0;
  x = arr[0];
  y = arr[1];
  z = arr[2];
  if (k >= (x + y + z - 3)) {
    cout << x * y * z;
    return 0;
  }
  if (k == 0) {
    cout << 1;
    return 0;
  }
  k3 = k / 3;
  ostatok = k % 3;
  if (x - 1 >= k3) {
    x -= k3;
    y -= k3;
    z -= k3;
    if (ostatok == 2) {
      if (z > 1) z--;
      if (y > 1) y--;
    }
    if (ostatok == 1)
      if (z > 1) z--;
  } else {
    diff = x - 1;
    x -= diff;
    y -= diff;
    z -= diff;
    k = k - 3 * diff;
    k3 = k / 2;
    ostatok = k % 2;
    if (y - 1 >= k3) {
      y -= k3;
      z -= k3;
      if (ostatok == 1)
        if (z > 1) z--;
    } else {
      diff = y - 1;
      y -= diff;
      z -= diff;
      k = k - 2 * diff;
      if (z > k)
        z -= k;
      else
        z = 1;
    }
  }
  result = (arr[0] - x + 1) * (arr[1] - y + 1) * (arr[2] - z + 1);
  cout << result;
  return 0;
}
