#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 5;
const int MAXN = 300005;
const int MOD = 1000000007;
const double eps = 1e-8;
const double PI = acos(-1.0);
long long solve(long long a, long long b, long long c, long long d) {
  long long r = min(a - b - c, d);
  if (r < 0)
    return 0;
  else
    return (r + 2) * (r + 1) / 2;
}
int main() {
  long long a, b, c, m;
  long long ans;
  while (scanf("%lld%lld%lld%lld", &a, &b, &c, &m) != EOF) {
    ans = (m + 3) * (m + 2) * (m + 1) / 6;
    for (int i = 0; i <= m; i++) {
      ans -= solve(a + i, b, c, m - i);
      ans -= solve(b + i, a, c, m - i);
      ans -= solve(c + i, a, b, m - i);
    }
    printf("%lld\n", ans);
  }
}
