#include <bits/stdc++.h>
using namespace std;
long long a, b, c, l;
long long count(long long dx, long long dy, long long l, long long r) {
  if (dx > dy) swap(dx, dy);
  long long il = 0;
  long long ir = dx - 1;
  long long res = 0;
  if (!(ir < l || il > r)) {
    long long xl = max(l, il);
    long long xr = min(r, ir);
    res += (xr + 1) * (xr + 2) / 2 - xl * (xl + 1) / 2;
  }
  il = dx;
  ir = dy;
  if (!(ir < l || il > r)) {
    long long xl = max(l, il);
    long long xr = min(r, ir);
    res += (xr - xl + 1) * (dx + 1);
  }
  il = dy + 1;
  ir = dx + dy;
  if (!(ir < l || il > r)) {
    long long xl = max(l, il);
    long long xr = min(r, ir);
    res += (ir - xl + 1) * (ir - xl + 2) / 2 - (ir - xr) * (ir - xr + 1) / 2;
  }
  return res;
}
long long solve1(long long x, long long y, long long z) {
  long long start = (x > y && x > z) ? x : max(y, z) + 1;
  long long res = 0;
  for (long long nx = start; nx <= start + l; nx++) {
    long long left = l - (nx - x);
    if (left < 0) break;
    long long need = (nx + 1) - (y + z);
    if (need > left) break;
    long long maxay = (nx - 1) - y;
    long long maxaz = (nx - 1) - z;
    res += count(maxay, maxaz, max(0LL, need), left);
  }
  return res;
}
long long solve2(long long x, long long y, long long z) {
  long long start = (x > z || y > z) ? max(x, y) : z + 1;
  long long res = 0;
  for (long long nx = start; nx <= start + l; nx++) {
    long long left = l - (nx - x) - (nx - y);
    if (left < 0) break;
    res += min(nx - 1, z + left) - z + 1;
  }
  return res;
}
long long solve3(long long x, long long y, long long z) {
  long long start = max(x, max(y, z));
  long long res = 0;
  for (long long nx = start; nx <= start + l; nx++) {
    long long left = l - (nx - x) - (nx - y) - (nx - z);
    if (left < 0) break;
    res += 1;
  }
  return res;
}
int main() {
  cin >> a >> b >> c >> l;
  long long res = 0;
  res += solve1(a, b, c);
  res += solve1(b, c, a);
  res += solve1(c, a, b);
  res += solve2(a, b, c);
  res += solve2(a, c, b);
  res += solve2(b, c, a);
  res += solve3(a, b, c);
  cout << res << endl;
  return 0;
}
