#include <bits/stdc++.h>
using namespace std;
long long a, b, c, l, A, B, C, ans;
int main() {
  scanf("%I64d%I64d%I64d%I64d", &a, &b, &c, &l);
  l -= (!a + !b + !c);
  a += !a;
  b += !b;
  c += !c;
  for (long long i = 0; i <= l; i++)
    A = max(min(l - i, a + i - b - c), -1ll) + 2,
    B = max(min(l - i, b + i - a - c), -1ll) + 2,
    C = max(min(l - i, c + i - b - a), -1ll) + 2,
    ans -= A * (A - 1) + B * (B - 1) + C * (C - 1);
  printf("%I64d", (ans / 2 + ((l + 3) * (l + 2) * (l + 1)) / 6) * (l >= 0));
  return 0;
}
