#include <bits/stdc++.h>
using namespace std;
void sll(long long &x) {
  register char c = getchar();
  x = 0;
  int neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
  if (neg) x = -x;
}
void wll(long long a) {
  if (a < 0) {
    putchar('-');
    a = -a;
  }
  char snum[100];
  int i = 0;
  do {
    snum[i++] = a % 10 + 48;
    a = a / 10;
  } while (a != 0);
  --i;
  while (i >= 0) putchar(snum[i--]);
  putchar('\n');
}
void wi(int a) {
  if (a < 0) {
    putchar('-');
    a = -a;
  }
  char snum[100];
  int i = 0;
  do {
    snum[i++] = a % 10 + 48;
    a = a / 10;
  } while (a != 0);
  --i;
  while (i >= 0) putchar(snum[i--]);
  putchar('\n');
}
void wl(long a) {
  if (a < 0) {
    putchar('-');
    a = -a;
  }
  char snum[100];
  int i = 0;
  do {
    snum[i++] = a % 10 + 48;
    a = a / 10;
  } while (a != 0);
  --i;
  while (i >= 0) putchar(snum[i--]);
  putchar('\n');
}
void sl(long &x) {
  register char c = getchar();
  x = 0;
  int neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
  if (neg) x = -x;
}
void si(int &x) {
  register char c = getchar();
  x = 0;
  int neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
  if (neg) x = -x;
}
long long power(long long a, long long b, long long mod) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = ret * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ret;
}
long long gcd(long long a, long long b) {
  while (b) b ^= a ^= b ^= a %= b;
  return a;
}
int main() {
  long long t, i, j, k, l;
  long long a, b, c, d;
  sll(a);
  sll(b);
  sll(c);
  sll(l);
  t = (l + 1) * (l + 2) * (l + 3) / 6;
  long long ans = 0;
  for (i = 0; i <= l; i++) {
    long long x = min(l - i, i + a - b - c);
    if (x >= 0) {
      x = ((x + 1) * (x + 2)) >> 1;
      ans += x;
    }
    x = min(l - i, i + c - b - a);
    if (x >= 0) {
      x = ((x + 1) * (x + 2)) >> 1;
      ans += x;
    }
    x = min(l - i, i + b - c - a);
    if (x >= 0) {
      x = ((x + 1) * (x + 2)) >> 1;
      ans += x;
    }
  }
  wll(t - ans);
  return 0;
}
