#include <bits/stdc++.h>
using namespace std;
void gt(int &a, int b) {
  if (a < b) a = b;
}
string n2s(int a) {
  stringstream ss;
  ss << a;
  return ss.str();
}
string getKey(int v, int h) { return n2s(v) + "-" + n2s(h); }
int range(int x, int y) { return max(y - x + 1, 0); }
int getPair(int sum, int other, int a, int b) {
  if (sum <= other) return 0;
  int dif = other - 1;
  return range(max((int)ceil((sum - dif) / 2.0), a),
               min((sum + dif) / 2, sum - b));
}
long long u[2000000]{0}, v[2000000]{0}, w[2000000]{0}, t[2000000]{0},
    ways[2000000]{0};
int main() {
  int a, b, c, l;
  cin >> a >> b >> c >> l;
  l = l + a + b + c;
  for (int i = 2; i <= l; i++) {
    u[i] = u[i - 1] + getPair(i - a, a, b, c);
    v[i] = v[i - 1] + getPair(i - b, b, a, c);
    t[i] = t[i - 1];
    if (i % 2 == 1 && (i + 1) / 2 - 1 >= c)
      t[i] += range(a + 1, (i + 1) / 2 - b - 1);
    w[i] = w[i - 1];
    if (i % 2 == 0 && (i + 2) / 2 - 2 >= c)
      w[i] += range(a + 1, (i + 2) / 2 - b - 1);
    ways[i] = ways[i - 2] + u[i] + v[i] -
              range(max(abs(a - b) + 1, c), min(a + b - 1, i - a - b)) + t[i] +
              w[i];
  }
  cout << ways[l] << endl;
  return 0;
}
