#include <bits/stdc++.h>
using namespace std;
long long a, b, c, l;
long long ans;
void calc(long long a, long long b, long long c) {
  for (long long i = max(0ll, a + b - c); i <= l; i++) {
    long long x = min(c + i - a - b, l - i);
    ans -= (x + 1) * (x + 2) / 2;
  }
}
signed main() {
  scanf("%lld%lld%lld%lld", &a, &b, &c, &l);
  for (long long i = 0; i <= l; i++) {
    ans += (i + 1) * (i + 2) / 2;
  }
  calc(a, b, c);
  calc(a, c, b);
  calc(b, c, a);
  printf("%lld", ans);
  return 0;
}
