#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[3], n;
  scanf("%d%d%d%d", &a[0], &a[1], &a[2], &n);
  long long ans = 0, sum = a[0] + a[1] + a[2];
  for (int i = (0); i <= (2); i++) {
    long long tmp = sum - a[i];
    long long cur = max((long long)a[i], tmp);
    for (int j = cur; j - a[i] <= n; j++) {
      long long left = n - (j - a[i]);
      left = min(left, 2 * a[i] - sum + j - a[i]);
      ans += (left + 2) * (left + 1) / 2;
    }
  }
  cout << (long long)(n + 3) * (n + 2) * (n + 1) / 6 - ans << endl;
  return 0;
}
