#include <bits/stdc++.h>
using namespace std;
void run() {
  long long a, b, c, l;
  vector<long long> al(3);
  cin >> al[0] >> al[1] >> al[2] >> l;
  sort(al.begin(), al.end());
  a = al[2];
  b = al[1];
  c = al[0];
  long long sum = 0;
  for (int i = 0; i < 3; i++) {
    for (long long la = 0; la <= l; la++) {
      long long x = max(
          -1LL, min(al[i] - al[(i + 1) % 3] - al[(i + 2) % 3] + la, l - la));
      sum += ((x + 2) * (x + 1)) / 2;
    }
  }
  long long total = ((l + 1) * (l + 2) * (l + 3)) / 6;
  cout << total - sum << "\n";
}
int main() {
  cout << fixed << setprecision(16);
  run();
  return 0;
}
