#include <bits/stdc++.h>
using namespace std;
void task();
int main() {
  int tests = 1;
  for (int i = 1; i <= tests; ++i) task();
  return 0;
}
int a, b, c, l;
long long int get(int a, int b, int c) {
  long long int res = 0;
  for (int i = 0; i <= l; ++i) {
    long long int bad = min(l - i, a + i - b - c) + 1;
    if (bad > 0) res += bad * (bad + 1) / 2;
  }
  return res;
}
void task() {
  cin >> a >> b >> c >> l;
  long long int all = 0;
  for (int i = 0; i <= l; ++i) {
    long long int yet = l - i + 1;
    all += yet * (yet + 1) / 2;
  }
  long long int bad = 0;
  bad += get(a, b, c);
  bad += get(b, a, c);
  bad += get(c, a, b);
  cout << all - bad;
}
