#include <bits/stdc++.h>
using namespace std;
int a[3], b[3];
int main() {
  int l, i, j, k;
  long long ans = 0, x, t;
  scanf("%d%d%d%d", &a[0], &a[1], &a[2], &l);
  for (i = 0; i <= l; i++) {
    for (j = 0; j < 3; j++) {
      b[j] = (a[0] + a[1] + a[2] + i - 1) / 2 - a[j];
    }
    if (b[0] < 0 || b[1] < 0 || b[2] < 0) continue;
    for (k = 0; k < 8; k++) {
      x = (long long)i;
      t = 1ll;
      for (j = 0; j < 3; j++) {
        if ((k >> j) & 1) {
          t = -t;
          x -= b[j] + 1;
        }
      }
      if (x >= 0) {
        ans += 1ll * t * ((x + 2ll) * (x + 1ll) / 2ll);
      }
    }
  }
  printf("%I64d\n", ans);
  return 0;
}
