#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<long long int> har(3);
  long long int L;
  cin >> har[0] >> har[1] >> har[2] >> L;
  sort(har.begin(), har.end());
  long long int p_ans = 0, tmp;
  for (long long int i = 0; i < 3; ++i) {
    for (long long int j = 0; j <= L; ++j) {
      tmp = max(-1LL,
                min(har[i] - har[(i + 1) % 3] - har[(i + 2) % 3] + j, L - j));
      p_ans += ((tmp + 1) * (tmp + 2)) / 2;
    }
  }
  long long int max_p = ((L + 1) * (L + 2) * (L + 3)) / 6;
  cout << max_p - p_ans << endl;
  return 0;
}
