#include <bits/stdc++.h>
using namespace std;
int x[100][4000], n;
int main() {
  x[0][0] = 1;
  for (int i = 1; i < 10; i++) {
    for (int j = 0; j < 4000; j++) {
      for (int k = 0; k <= 1000; k++) {
        x[i][j + k] += x[i - 1][j];
      }
    }
  }
  int n;
  while (cin >> n) {
    cout << x[4][n];
  }
}
