#include <bits/stdc++.h>
using namespace std;
const int N = 333333;
long long a[5], len, s[N], res, t, e;
int main() {
  std::ios::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 0; i < 3; i++) cin >> a[i];
  cin >> len;
  s[0] = 1;
  for (int i = 1; i <= len; i++) {
    s[i] = s[i - 1] + i + 1;
  }
  res = 0;
  for (int i = 0; i <= len; i++) {
    res = res + s[i];
  }
  t = 0;
  for (int i = 0, j, k; i < 3; i++) {
    j = (i + 1) % 3;
    k = (i + 2) % 3;
    for (int x = 0; x <= len; x++) {
      e = min(len - x, a[i] + x - a[j] - a[k]);
      if (e < 0) continue;
      t = t + s[e];
    }
  }
  res = res - t;
  cout << res << "\n";
  return 0;
}
