#include <bits/stdc++.h>
const int N = 1e5 + 100;
const int M = 1e5 + 100;
const double EPS = 1e-9;
using namespace std;
int a, b, c, l;
long long ans;
long long calc(long long a1, long long len) {
  long long tp = ((a1 + a1 + len - 1ll) * len) / 2ll;
  return tp;
}
long long solve(int a1, int b1, int c1, int len) {
  long long tp = ceil((b1 + c1 + len - a1) / 2.0 - 0.1);
  tp = max(0ll, tp);
  len -= tp;
  if (len < 0) return 0;
  long long hp = calc(1, len + 1);
  return max(0ll, hp);
}
int main() {
  scanf("%d%d%d%d", &a, &b, &c, &l);
  for (int i = 0; i <= l; i++) {
    long long tp1 = max(0ll, calc(1, i + 1));
    long long tp2 = 0;
    tp2 += solve(a, b, c, i);
    tp2 += solve(b, a, c, i);
    tp2 += solve(c, a, b, i);
    ans += tp1 - tp2;
  }
  printf("%lld\n", ans);
  return 0;
}
