#include <bits/stdc++.h>
using namespace std;
int main(int argc, char **argv) {
  int a[3], l;
  long long comb;
  cin >> a[0] >> a[1] >> a[2] >> l;
  comb = 1LL * (l + 1) * (l + 2) * (l + 3) / 6;
  long long untri = 0;
  for (int i = 0; i < 3; i++) {
    int aa = a[i];
    int bb = a[(i + 1) % 3];
    int cc = a[(i + 2) % 3];
    for (int j = 0; j <= l; j++) {
      if (aa + j < bb + cc) continue;
      int x = min(l - j, (aa + j - bb - cc));
      untri += 1LL * (x + 1) * (x + 2) / 2;
    }
  }
  long long result = comb - untri;
  cout << result << endl;
  return 0;
}
