#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int N = 300005;
long long ans;
long long a[3];
long long l;
long long fnd() {
  long long res = 0;
  long long le = max(a[0], a[1] + a[2]);
  long long re = a[0] + l;
  for (long long i = le; i <= re; ++i) {
    long long dif = i - a[0];
    long long new_l = min(l - dif, i - a[1] - a[2]);
    if (new_l >= 0) {
      res += new_l + 1 + (new_l * (new_l + 1)) / 2;
    }
  }
  return res;
}
int main() {
  ;
  cin >> a[0] >> a[1] >> a[2] >> l;
  ans = l * (l + 1) * (2 * l + 1) / 6 + 3 * ((l) * (l + 1)) / 2 + 2 * (l + 1);
  ans /= 2;
  ans -= fnd();
  swap(a[0], a[1]);
  ans -= fnd();
  swap(a[0], a[2]);
  ans -= fnd();
  cout << ans << endl;
  return 0;
}
