#include <bits/stdc++.h>
using namespace std;
int a, b, c, l;
long long Ans;
int main() {
  cin >> a >> b >> c >> l;
  for (int i = 0; i <= l; i++) {
    long long lim = (a + b + c + i - 1) / 2;
    if (a <= lim && b <= lim && c <= lim) {
      Ans += (long long)(i + 2) * (i + 1) / 2;
      if (a + i > lim) {
        Ans -= (long long)(i + a - lim + 1) * (i + a - lim) / 2;
      }
      if (b + i > lim) {
        Ans -= (long long)(i + b - lim + 1) * (i + b - lim) / 2;
      }
      if (c + i > lim) {
        Ans -= (long long)(i + c - lim + 1) * (i + c - lim) / 2;
      }
    }
  }
  cout << Ans << endl;
  return 0;
}
