#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
long long sum;
long long res[2000000];
long long cal(long long a, long long b, long long l) {
  long long ans = 0;
  for (int i = a; i <= a + l; i++) {
    long long remid = l + a - i;
    long long s = b;
    long long t = min((long long)i, remid + b);
    if (b <= t) {
      ans += res[t - b];
      if (i == a) ans -= 1;
    }
  }
  return ans;
}
int main() {
  res[0] = 1;
  for (int i = 1; i <= 1000000; i++) {
    res[i] = res[i - 1] + i + 1;
  }
  int a, b, c, l;
  cin >> a >> b >> c >> l;
  for (int i = 1; i <= l; i++) {
    sum += (long long)(i + 1) * i / 2 + (i + 1);
  }
  sum -= cal(a, b + c, l) + cal(b, a + c, l) + cal(c, a + b, l);
  if (a + b > c && fabs(a - b) < c) sum++;
  cout << sum << endl;
  return 0;
}
