#include <bits/stdc++.h>
using namespace std;
long long C(int n, int k) {
  long long ans;
  if (!n) return 1;
  ans = (long long)(n - 1) * (n - 2) / 2 + (n - 1) * 3 + 3;
  return ans;
}
long long query1(int del, int l) {
  if (del > l) return 0;
  return C(l - del, 3);
}
long long query2(int del1, int del2, int l) {
  if (del1 + del2 > l) return 0;
  return C(l - del1 - del2, 3);
}
long long query3(int del1, int del2, int del3, int l) {
  if (del1 + del2 + del3 > l) return 0;
  return C(l - del1 - del2 - del3, 3);
}
int main() {
  long long res = 0;
  int a, b, c, l, sum;
  cin >> a >> b >> c >> l;
  sum = a + b + c;
  for (int i = 0; i <= l; i++) {
    int s = (sum + i - 1) / 2;
    if (a > s || b > s || c > s) continue;
    long long p = C(i, 3);
    s += 1;
    long long q = query1(s - a, i) + query1(s - b, i) + query1(s - c, i);
    res += p - q;
  }
  cout << res;
}
