#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int dp[4001];
  while (true) {
    cin >> n;
    if (cin.eof()) {
      return 0;
    }
    for (int i = 0; i <= n; i++) {
      dp[i] = 1;
    }
    for (int i = 0; i < 3; i++) {
      for (int j = n; j >= 0; j--) {
        int *begin = dp + max(0, j - 1000);
        int *end = dp + j + 1;
        dp[j] = accumulate(begin, end, 0);
      }
    }
    cout << dp[n] << endl;
  }
}
