#include <bits/stdc++.h>
using namespace std;
int main() {
  int x[3], l;
  scanf("%d%d%d%d", x, x + 1, x + 2, &l);
  long long ans = 1LL * (l + 3) * (l + 2) * (l + 1) / 6;
  for (int i = 0; i < 3; i++)
    for (int lx = 0; lx <= l; lx++) {
      int xx = min(l - lx, x[i] + lx - x[(i + 1) % 3] - x[(i + 2) % 3]);
      if (xx >= 0) ans -= 1LL * (2 + xx) * (1 + xx) / 2;
    }
  cout << ans << endl;
  return 0;
}
