#include <bits/stdc++.h>
using namespace std;
using LL = long long;
LL solve(int x, int y, int z, int t) {
  LL c = t - (y + z - x);
  if (c < 0)
    return 0;
  else {
    c = c / 2;
  }
  if (c > t) c = t;
  return (LL)(c + 2) * (c + 1) / 2;
}
int main() {
  int x, y, z, w;
  cin >> x >> y >> z >> w;
  LL res = 0;
  for (int i = 0; i <= w; ++i) {
    res += (LL)(i + 2) * (i + 1) / 2;
  }
  for (int i = 0; i <= w; ++i) {
    res -= solve(x, y, z, i);
    res -= solve(y, x, z, i);
    res -= solve(z, x, y, i);
  }
  cout << res << endl;
  return 0;
}
