#include <bits/stdc++.h>
using namespace std;
int N, T, M, K;
long long min(long long a, long long b) { return a < b ? a : b; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long cube[3], p = 1, q = 1, r = 1;
  cin >> cube[0] >> cube[1] >> cube[2] >> K;
  while (K > 0) {
    if (p < cube[0] && K > 0) p++, K--;
    if (q < cube[1] && K > 0) q++, K--;
    if (r < cube[2] && K > 0) r++, K--;
    if (p == cube[0] && q == cube[1] && r == cube[2]) break;
  }
  cout << p * q * r << endl;
  return 0;
}
