#include <bits/stdc++.h>
template <typename T>
inline void rd(T& x) {
  int si = 1;
  char c = getchar();
  x = 0;
  while (!isdigit(c)) si = c == '-' ? -1 : si, c = getchar();
  while (isdigit(c)) x = x * 10 + c - 48, c = getchar();
  x *= si;
}
template <typename T, typename... Args>
inline void rd(T& x, Args&... args) {
  rd(x);
  rd(args...);
}
const int kN = 4e5 + 5, kInf = 0x3f3f3f3f;
const long long kMod = 998244353, kInfLL = 0x3f3f3f3f3f3f3f3fLL;
long long C(int n, int m) {
  if (n < m) return 0;
  long long ret = 1;
  for (int i = n - m + 1; i <= n; ++i) ret *= i;
  for (int i = 1; i <= m; ++i) ret /= i;
  return ret;
}
long long Calc(long long r1, long long r2, long long r3, long long sum) {
  if (r1 < 1 || r2 < 1 || r3 < 1 || sum > r1 + r2 + r3 || sum < 3) return 0;
  long long ret = 0;
  ret += C(sum - 1, 2);
  ret -= C(sum - r1 - 1, 2) + C(sum - r2 - 1, 2) + C(sum - r3 - 1, 2);
  ret += C(sum - r1 - r2 - 1, 2) + C(sum - r2 - r3 - 1, 2) +
         C(sum - r3 - r1 - 1, 2);
  ret -= C(sum - r1 - r2 - r3 - 1, 2);
  return ret;
}
int main() {
  int T = 1;
  while (T--) {
    long long a, b, c, l;
    rd(a, b, c, l);
    long long ans = 0;
    for (long long i = a + b + c; i <= a + b + c + l; ++i) {
      int p = (i - 1) / 2;
      ans += Calc(p - a + 1, p - b + 1, p - c + 1, i - a - b - c + 3);
    }
    printf("%lld\n", ans);
  }
  return 0;
}
