#include <bits/stdc++.h>
using namespace std;
long long a, b, c, l, sum, ans;
int main() {
  scanf("%lld%lld%lld%lld", &a, &b, &c, &l);
  sum = a + b + c + l;
  for (int i = 0; i <= l; i++) ans += 1ll * (i + 1) * (i + 2) / 2;
  for (int i = a; i <= a + l; i++) {
    if (b + c - i > 0) continue;
    long long tmp = min(1ll * i, sum - i);
    ans -= 1ll * (tmp - b - c + 1) * (tmp - b - c + 2) / 2;
  }
  for (int i = b; i <= b + l; i++) {
    if (a + c - i > 0) continue;
    int tmp = min(1ll * i, sum - i);
    ans -= 1ll * (tmp - a - c + 1) * (tmp - a - c + 2) / 2;
  }
  for (int i = c; i <= c + l; i++) {
    if (b + a - i > 0) continue;
    int tmp = min(1ll * i, sum - i);
    ans -= 1ll * (tmp - b - a + 1) * (tmp - b - a + 2) / 2;
  }
  printf("%lld\n", ans);
}
