#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int maxn = 505;
const double eps = 1e-9;
const double pi = acos(-1.0);
long long a, b, c, l;
long long cal3(long long s, long long cc, long long dd) {
  s = min(cc + dd, s);
  if (s < 0) return 0;
  if (s <= cc) return (s + 1) * (s + 2) / 2;
  if (s <= dd) return (cc + 1) * (cc + 2) / 2 + (cc + 1) * (s - cc);
  return cal3(dd, cc, dd) + (2 * cc + dd - s + 1) * (s - dd) / 2;
}
long long cal(long long s) {
  long long aa, bb, cc, dd;
  aa = s;
  bb = max((c + s - a - b + 2) / 2, 0LL);
  if (a + c + s - b <= 0 || b + c + s - a <= 0) return 0;
  cc = min(s, (a + c + s - b - 1) / 2);
  dd = min(s, (b + c + s - a - 1) / 2);
  if (aa < bb || cc < 0 || dd < 0) return 0;
  if (cc > dd) swap(cc, dd);
  return cal3(aa, cc, dd) - cal3(bb - 1, cc, dd);
}
int main() {
  int i, j;
  scanf("%I64d %I64d %I64d %I64d", &a, &b, &c, &l);
  long long r = 0;
  for (i = 0; i <= l; i++) r += cal(i);
  printf("%I64d\n", r);
  return 0;
}
