#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T pr(T x) {
  return --x;
}
template <class T>
inline T nx(T x) {
  return ++x;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline void get(T &n) {
  char c = getchar();
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  n = 0;
  T s = 1;
  if (c == '-') s = -1, c = getchar();
  while (c >= '0' && c <= '9') n *= 10, n += c - '0', c = getchar();
  n *= s;
}
const long long maxn = 300010;
long long a[3], sum, l, ans, s[maxn], ss[maxn];
inline long long S(long long i, long long j) {
  return i ? s[j] - s[i - 1] : s[j];
}
inline long long SS(long long i, long long j) {
  return i ? ss[j] - ss[i - 1] : ss[j];
}
int main() {
  long long i, j, k, t, tt, x, y, z;
  for (i = (1); i <= (maxn - 1); ++i) s[i] = s[i - 1] + i;
  for (i = (1); i <= (maxn - 1); ++i) ss[i] = ss[i - 1] + i * i;
  get(a[0]);
  get(a[1]);
  get(a[2]);
  get(l);
  sum = a[0] + a[1] + a[2];
  for (t = (0); t <= (l); ++t) {
    tt = 0;
    for (i = (0); i <= (2); ++i) {
      x = max((sum - 2 * a[i] + t + 1) / 2, 0ll);
      if (x <= t) tt += s[t + 1 - x];
    }
    ans += (t + 2) * (t + 1) / 2 - tt;
  }
  cout << ans << endl;
  return 0;
}
