#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a[3];
  for (int i = 0; i < (3); i++) cin >> a[i];
  int L;
  cin >> L;
  long long cnt = 0;
  for (int l = 0; l < (L + 1); l++) {
    long long sum = a[0] + a[1] + a[2] + l;
    long long half = (sum - 1) / 2;
    if (a[0] > half || a[1] > half || a[2] > half) continue;
    cnt += 1LL * (l + 2) * (l + 1) / 2;
    for (int i = 0; i < (3); i++) {
      if (a[i] + l > half) {
        cnt -= 1LL * (l - half + a[i] + 1) * (l - half + a[i]) / 2;
      }
    }
  }
  cout << cnt << endl;
}
