#include <bits/stdc++.h>
using namespace std;
const int INF = (-1u) / 2;
const long long int INF2 = (-1ull) / 2;
long long int a, b, i, d[1011000], j, k, n, m, timer = 0, l, r, x, y;
long long int c, cnt = 0, fl = 0, a2, a3 = -1000000, ans = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> a >> b >> c >> l;
  for (i = a; i <= a + l; i++) {
    if ((i < b + c)) continue;
    x = l - (i - a);
    y = i - (b + c);
    y = min(y, x);
    y++;
    ans += ((y * (y + 1ll)) / 2ll);
  }
  swap(a, b);
  for (i = a; i <= a + l; i++) {
    if ((i < b + c)) continue;
    x = l - (i - a);
    y = i - (b + c);
    y = min(y, x);
    y++;
    ans += ((y * (y + 1ll)) / 2ll);
  }
  swap(a, b);
  swap(a, c);
  for (i = a; i <= a + l; i++) {
    if ((i < b + c)) continue;
    x = l - (i - a);
    y = i - (b + c);
    y = min(y, x);
    y++;
    ans += ((y * (y + 1ll)) / 2ll);
  }
  swap(a, c);
  fl = 0;
  for (i = 0; i <= l; i++) {
    x = l - i;
    x++;
    fl += ((x * (x + 1ll)) / 2ll);
  }
  cout << fl - ans << endl;
  return 0;
}
