#include <bits/stdc++.h>
using namespace std;
bool maxl(long long a, long long b) { return a > b; }
bool minl(long long a, long long b) { return a < b; }
bool cmp(int a, int b) { return a > b; }
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
int main() {
  long long a, k, b, c;
  cin >> a >> b >> c;
  cin >> k;
  long long a1 = 1;
  long long a2 = 1;
  long long a3 = 1;
  while (k > 0) {
    int z = 0;
    if (a1 < a) {
      a1++;
      k--;
      z = 1;
    }
    if (k == 0) break;
    if (a2 < b) {
      a2++;
      k--;
      z = 1;
    }
    if (k == 0) break;
    if (a3 < c) {
      a3++;
      k--;
      z = 1;
    }
    if (k == 0) break;
    if (z == 0) break;
  }
  long long ans = (a1) * (a2) * (a3);
  cout << ans << endl;
  return 0;
}
