#include <bits/stdc++.h>   using namespace std;   int main() {     long long int a, b, c, l;     cin >> a >> b >> c >> l;     long long int Total = (l + 1) * (l + 2) * (l + 3) / 6;     for (long long int la = 0; la <= l; la++) {       long long int mini = min(a - b - c + la, l - la);       if (mini < 0) continue;       long long int wrong = (mini + 1) * (mini + 2) / 2;       Total -= wrong;     }     for (long long int lb = 0; lb <= l; lb++) {       long long int mini = min(b - a - c + lb, l - lb);       if (mini < 0) continue;       long long int wrong = (mini + 1) * (mini + 2) / 2;       Total -= wrong;     }     for (long long int lc = 0; lc <= l; lc++) {       long long int mini = min(c - b - a + lc, l - lc);       if (mini < 0) continue;       long long int wrong = (mini + 1) * (mini + 2) / 2;       Total -= wrong;     }     cout << Total << endl;     return 0;   }   