#include <bits/stdc++.h>
using namespace std;
long long a[3], l, k, t, ans, i, j;
int main() {
  while (scanf("%I64d%I64d%I64d%I64d", &a[0], &a[1], &a[2], &l) != EOF) {
    ans = (l + 3) * (l + 2) * (l + 1) / 6;
    for (i = 0; i < 3; i++) {
      for (j = 0; j <= l; j++) {
        a[i] += j;
        t = a[i] * 2 - a[0] - a[1] - a[2];
        if (t >= 0) {
          k = l - j;
          t = min(t, k);
          ans -= (t + 1) * (t + 2) / 2;
        }
        a[i] -= j;
      }
    }
    printf("%I64d\n", ans);
  }
  return 0;
}
