#include <bits/stdc++.h>
int D = 1;
int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
using namespace std;
bool comb(pair<int, int> a, pair<int, int> b) {
  if (a.first == b.first) {
    return a.second > b.second;
  } else
    return a > b;
}
int main() {
  int n;
  while (cin >> n && n) {
    int ans = 0;
    for (int i = 0; i <= 1000; i++) {
      for (int j = 0; i + j <= n; j++) {
        for (int k = 0; i + j + k <= n; k++) {
          for (int l = 0; i + j + k + l <= n; l++) {
            if (i + j + k + l == n) ans++;
          }
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}
