#include <bits/stdc++.h>
using namespace std;
long long sumAr(long long from, long long to) {
  from = max(from, 0ll);
  long long res = (to - from + 1) * from;
  to -= from;
  res += to * (to + 1) / 2;
  return res;
}
long long solve(long long _a, long long b, long long c, long long _l) {
  long long ans = 0;
  for (int i = 0; i <= _l; ++i) {
    long long l = _l - i;
    long long a = _a + i;
    if (a <= b || a <= c) continue;
    if (b + c + l <= a) continue;
    long long p = a - b - 1;
    long long q = a - c - 1;
    long long curr = 0;
    if (b + c <= a) {
      long long up = a - b - c + 1;
      curr -= sumAr(1, up);
    }
    long long full = l - q;
    if (full >= p) {
      curr += (p + 1) * (q + 1);
      ans += curr;
      continue;
    }
    if (full >= 0) {
      curr += (full + 1) * (q + 1);
      curr += sumAr(max(full + q - p, 0ll) + 1, q);
      ans += curr;
      continue;
    }
    curr += sumAr(max(0ll, l - p) + 1, l + 1);
    ans += curr;
  }
  return ans;
}
long long solve2(long long _a, long long _b, long long _c, long long _l) {
  if (_a < _b) swap(_a, _b);
  _l -= (_a - _b);
  _b = _a;
  if (_l < 0) return 0;
  long long ans = 0;
  for (int i = 0; 2 * i <= _l; ++i) {
    long long a = _a + i;
    long long l = _l - 2 * i;
    if (_c >= a) continue;
    long long maxC = min(a - 1, _c + l);
    ans += maxC - _c + 1;
  }
  return ans;
}
long long solve3(long long _a, long long _b, long long _c, long long _l) {
  vector<long long> kek;
  kek.push_back(_a);
  kek.push_back(_b);
  kek.push_back(_c);
  sort(kek.begin(), kek.end());
  _a = kek[2];
  _b = kek[1];
  _c = kek[0];
  _l -= _a - _c;
  _l -= _a - _b;
  if (_l < 0) return 0;
  return 1 + _l / 3;
}
long long malafya(long long a, long long b, long long c, long long l) {
  long long ans = 0;
  ans += solve(a, b, c, l);
  ans += solve(b, c, a, l);
  ans += solve(c, a, b, l);
  ans += solve2(a, b, c, l);
  ans += solve2(a, c, b, l);
  ans += solve2(b, c, a, l);
  ans += solve3(a, b, c, l);
  return ans;
}
bool check(long long a, long long b, long long c) {
  return ((a < b + c) && (b < a + c) && (c < a + b));
}
long long stupid(long long a, long long b, long long c, long long l) {
  long long ans = 0;
  for (int i = 0; i <= l; ++i)
    for (int j = 0; i + j <= l; ++j)
      for (int k = 0; i + j + k <= l; ++k)
        if (check(a + i, b + j, c + k)) {
          ++ans;
        }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long a, b, c, l;
  cin >> a >> b >> c >> l;
  cout << malafya(a, b, c, l) << endl;
}
