#include <bits/stdc++.h>
using namespace std;
long long func(long long nw) {
  long long n;
  if (nw < 0) return 0;
  if ((nw + 2) % 2 == 0) {
    n = (nw + 2) / 2;
    n = n * (nw + 1);
  } else {
    n = (nw + 1) / 2;
    n = n * (nw + 2);
  }
  return n;
}
int main() {
  long long a, b, c, l, n, s, i, xa, xb, aa, bb, cc, na, nb, nc, xc, nab, nbc,
      nac, nabc, res;
  while (scanf("%I64d%I64d%I64d%I64d", &a, &b, &c, &n) == 4) {
    res = 0;
    for (l = 0; l <= n; l++) {
      na = nb = nc = nab = nbc = nac = nabc = 0;
      s = func(l);
      aa = ceil((b + c + l - a) / 2.0);
      bb = ceil((a + c + l - b) / 2.0);
      cc = ceil((a + b + l - c) / 2.0);
      if (aa <= 0 || bb <= 0 || cc <= 0) continue;
      xb = l - bb;
      xc = l - cc;
      na = func(l - aa);
      nb = func(l - bb);
      nc = func(l - cc);
      nab = func(l - aa - bb);
      nbc = func(l - bb - cc);
      nac = func(l - aa - cc);
      nabc = func(l - aa - bb - cc);
      res = res + (s - (na + nb + nc - nab - nbc - nac + nabc));
    }
    printf("%I64d\n", res);
  }
  return 0;
}
