#include <bits/stdc++.h>
using namespace std;
void C0(int a, int b, int c) {
  int ind = 0;
  int cc = c / 3;
  a -= 2;
  cout << ind << ' ';
  for (int j = 0; j < cc; j++) {
    ind += 3;
    cout << ind << ' ';
  }
  ind++;
  cout << ind << ' ';
  for (int j = 0; j < cc; ++j) {
    ind -= 3;
    cout << ind << ' ';
  }
  ind++;
  cout << ind << ' ';
  for (int j = 0; j < cc; j++) {
    ind += 3;
    cout << ind << ' ';
  }
  for (int j = 0; j < a - 1; ++j) {
    ind++;
    cout << ind << ' ';
  }
  if (b % 2 == 0) {
    for (int j = 0; j < b / 2; ++j) {
      ind += 2;
      cout << ind << ' ';
    }
    ind++;
    cout << ind << ' ';
    for (int j = 0; j < b / 2; ++j) {
      ind -= 2;
      cout << ind << ' ';
    }
  } else {
    for (int j = 0; j < (b + 1) / 2; ++j) {
      ind += 2;
      cout << ind << ' ';
    }
    ind--;
    cout << ind << ' ';
    for (int j = 0; j < b / 2; ++j) {
      ind -= 2;
      cout << ind << ' ';
    }
  }
}
void C1(int a, int b, int c) {
  int ind = 0;
  int cc = c / 3;
  a--;
  b -= 2;
  cout << ind << ' ';
  for (int j = 0; j < cc + 1; j++) {
    ind += 3;
    cout << ind << ' ';
  }
  ind -= 2;
  cout << ind << ' ';
  for (int j = 0; j < cc; ++j) {
    ind -= 3;
    cout << ind << ' ';
  }
  ind++;
  cout << ind << ' ';
  for (int j = 0; j < cc; j++) {
    ind += 3;
    cout << ind << ' ';
  }
  ind += 2;
  cout << ind << ' ';
  for (int j = 0; j < a - 1; ++j) {
    ind++;
    cout << ind << ' ';
  }
  if (b % 2 == 0) {
    for (int j = 0; j < b / 2; ++j) {
      ind += 2;
      cout << ind << ' ';
    }
    ind++;
    cout << ind << ' ';
    for (int j = 0; j < b / 2; ++j) {
      ind -= 2;
      cout << ind << ' ';
    }
  } else {
    for (int j = 0; j < (b + 1) / 2; ++j) {
      ind += 2;
      cout << ind << ' ';
    }
    ind--;
    cout << ind << ' ';
    for (int j = 0; j < b / 2; ++j) {
      ind -= 2;
      cout << ind << ' ';
    }
  }
}
void C2(int a, int b, int c) {
  int ind = 0;
  int cc = (c + 1) / 3;
  a -= 2;
  cout << ind << ' ';
  for (int j = 0; j < cc; j++) {
    ind += 3;
    cout << ind << ' ';
  }
  ind--;
  cout << ind << ' ';
  for (int j = 0; j < cc - 1; ++j) {
    ind -= 3;
    cout << ind << ' ';
  }
  ind--;
  cout << ind << ' ';
  for (int j = 0; j < cc; j++) {
    ind += 3;
    cout << ind << ' ';
  }
  for (int j = 0; j < a - 1; ++j) {
    ind++;
    cout << ind << ' ';
  }
  if (b % 2 == 0) {
    for (int j = 0; j < b / 2; ++j) {
      ind += 2;
      cout << ind << ' ';
    }
    ind++;
    cout << ind << ' ';
    for (int j = 0; j < b / 2; ++j) {
      ind -= 2;
      cout << ind << ' ';
    }
  } else {
    for (int j = 0; j < (b + 1) / 2; ++j) {
      ind += 2;
      cout << ind << ' ';
    }
    ind--;
    cout << ind << ' ';
    for (int j = 0; j < b / 2; ++j) {
      ind -= 2;
      cout << ind << ' ';
    }
  }
}
int main() {
  long long a, b, c, l;
  cin >> a >> b >> c >> l;
  long long ans = (l + 3ll) * (l + 2ll) * (l + 1ll) / 6ll;
  for (long long i = 0ll; i <= l; ++i) {
    long long d = min(l - i, a + i - b - c);
    if (d < 0) continue;
    ans -= (d + 2ll) * (d + 1ll) / 2ll;
  }
  for (int i = 0; i <= l; ++i) {
    long long d = min(l - i, b + i - a - c);
    if (d < 0) continue;
    ans -= (d + 2ll) * (d + 1ll) / 2ll;
  }
  for (int i = 0; i <= l; ++i) {
    long long d = min(l - i, c + i - a - b);
    if (d < 0) continue;
    ans -= (d + 2ll) * (d + 1ll) / 2ll;
  }
  cout << ans << endl;
  return 0;
}
