#include <bits/stdc++.h>
using namespace std;
signed long long A, B, C, L;
signed long long ret;
signed long long dp[303030];
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  cin >> A >> B >> C >> L;
  dp[0] = 1;
  for (i = 1; i <= 300000; i++) dp[i] = dp[i - 1] + i / 2 + 1;
  for (i = 0; i <= L; i++) {
    signed long long a = A + i;
    signed long long left = L - i;
    ret += (left + 1) * (left + 2) / 2;
  }
  for (j = 0; j < 3; j++) {
    for (i = 0; i <= L; i++) {
      signed long long a = A + i;
      signed long long left = L - i;
      signed long long x = min(left, a - B - C);
      if (x >= 0) ret -= (x + 1) * (x + 2) / 2;
    }
    if (j == 0) swap(A, B);
    if (j == 1) swap(A, C);
  }
  cout << ret << endl;
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false);
  for (i = 0; i < argc - 1; i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < s.size(); i++) ungetc(s[s.size() - 1 - i], stdin);
  solve();
  return 0;
}
