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