#include <bits/stdc++.h>
long long tre(long long x) { return x * (x + 1) >> 1; }
long long count(int a, int ab, int ac, int b, int c, int t) {
  int x = ab - b + 1, y = ac - c + 1;
  if (x <= 0 || y <= 0) return 0;
  if (a + b + c > t) return 0;
  long long ans = (long long)x * y;
  if (a + ab + ac > t) {
    int s = a + ab + ac - t;
    ans -= tre(s);
    if (x < s) ans += tre(s - x);
    if (y < s) ans += tre(s - y);
  }
  if (b + c <= a) ans -= tre(a - b - c + 1);
  return ans;
}
int main() {
  int a, b, c, d, t, s;
  long long ans = 0;
  scanf("%d%d%d%d", &a, &b, &c, &t);
  t += a + b + c;
  for (int i = a; i * 2 < t; ++i) {
    ans += count(i, i, i, b, c, t);
  }
  for (int i = b; i * 2 < t; ++i) {
    ans += count(i, i - 1, i, a, c, t);
  }
  for (int i = c; i * 2 < t; ++i) {
    ans += count(i, i - 1, i - 1, a, b, t);
  }
  printf("%I64d\n", ans);
  return 0;
}
