#include <bits/stdc++.h>
using namespace std;
long long a[3], l, t = 0, d = 0;
long long Cal(int i, int j, int k) {
  long long d = 0;
  long long n = a[i] + a[j] - a[k];
  if (n >= 0) {
    n = l - n;
    for (long long k = 0; k < n + 1; k++) {
      long long m = min(k, n - k);
      d += (m + 1) * (m + 2) / 2;
    }
  } else {
    n = a[k] - (a[i] + a[j]);
    for (long long k = 0; k < l + 1; k++) {
      long long m = min(n + k, l - k);
      d += (m + 1) * (m + 2) / 2;
    }
  }
  return d;
}
int main() {
  cin >> a[0] >> a[1] >> a[2] >> l;
  for (int k = 0; k < l + 1; k++) t += (l - k + 1) * (l - k + 2) / 2;
  sort(a, a + 3);
  d += Cal(0, 1, 2);
  d += Cal(0, 2, 1);
  d += Cal(1, 2, 0);
  if (d > t) d = t;
  cout << t - d << endl;
}
