#include <bits/stdc++.h>
struct pairhash {
  template <typename T, typename U>
  std::size_t operator()(const std::pair<T, U> &x) const {
    return std::hash<T>()(x.first) ^ std::hash<U>()(x.second);
  }
};
long long compute_gcd(long long a, long long b) {
  if (b == 0) return a;
  return compute_gcd(b, a % b);
}
unsigned long long compute_lcm(unsigned long long a, unsigned long long b) {
  return a * b / compute_gcd(a, b);
}
long long count_wrong1(int a, int b, int c, int dl) {
  if (dl + a < b + c) {
    return 0;
  }
  int cur = std::min(dl, (dl + a - b - c) / 2);
  return (cur + 1) * (cur + 2) / 2;
}
int main() {
  long long l;
  std::vector<long long> data(3);
  for (int i = 0; i < 3; ++i) std::cin >> data[i];
  std::cin >> l;
  long long result = (l + 3) * (l + 2) * (l + 1) / 6;
  for (int i = 0; i < data.size(); ++i) {
    for (int dl = 0; dl <= l; ++dl) {
      int a = data[i];
      int b = data[(i + 1) % 3];
      int c = data[(i + 2) % 3];
      long long x = std::min<long long>(a - b - c + dl, l - dl);
      long long delta = (x + 1) * (x + 2) / 2;
      if (a + dl < b + c) continue;
      result -= delta;
    }
  }
  std::cout << result;
  return 0;
}
