#include <bits/stdc++.h>
int aa(int x) {
  if (x > 0)
    return x / 2;
  else
    return -((-x) / 2 + 1);
}
long long bio(int x, int y, int z, int k) {
  if (x + y + z < k)
    return 0;
  else {
    long long ans, a1, a2, a3, b1, b2, b3, c, a;
    if (x + 1 > k)
      a1 = 0LL;
    else
      a1 = (long long)(k - x + 1) * (long long)(k - x) / 2LL;
    if (y + 1 > k)
      a2 = 0LL;
    else
      a2 = (long long)(k - y + 1) * (long long)(k - y) / 2LL;
    if (z + 1 > k)
      a3 = 0LL;
    else
      a3 = (long long)(k - z + 1) * (long long)(k - z) / 2LL;
    if (x + y + 2 > k)
      b1 = 0LL;
    else
      b1 = (long long)(k - x - y) * (long long)(k - x - y - 1) / 2LL;
    if (z + y + 2 > k)
      b2 = 0LL;
    else
      b2 = (long long)(k - z - y) * (long long)(k - z - y - 1) / 2LL;
    if (x + z + 2 > k)
      b3 = 0LL;
    else
      b3 = (long long)(k - x - z) * (long long)(k - x - z - 1) / 2LL;
    if (x + y + z + 3 > k)
      c = 0LL;
    else
      c = (long long)(k - x - y - z - 1) * (long long)(k - x - y - z - 2) / 2LL;
    a = (long long)(k + 2) * (long long)(k + 1) / 2LL;
    ans = a - (a1 + a2 + a3) + (b1 + b2 + b3) - c;
    return ans;
  }
}
int main() {
  int a, b, c, l, x, y, z;
  long long ans = 0LL;
  scanf("%d%d%d%d", &a, &b, &c, &l);
  for (int i = 0; i <= l; i++) {
    if ((c + b + i - a) % 2 == 0)
      x = (c + b + i - a) / 2 - 1;
    else
      x = aa(c + b + i - a);
    if ((c + a + i - b) % 2 == 0)
      y = (c + a + i - b) / 2 - 1;
    else
      y = aa(c + a + i - b);
    if ((a + b + i - c) % 2 == 0)
      z = (a + b + i - c) / 2 - 1;
    else
      z = aa(a + b + i - c);
    if (x >= 0 && y >= 0 && z >= 0) {
      ans += bio(x, y, z, i);
    }
  }
  printf("%I64d", ans);
}
