#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    long long int counter = 0;
    for (int i = 0; i <= 1000; i++) {
      for (int j = 0; j <= 1000; j++) {
        int k = i + j;
        if (k > n) {
          break;
        } else {
          int l = n - k;
          counter += l + 1;
        }
      }
      if (i > n) {
        break;
      }
    }
    cout << counter << endl;
  }
  return 0;
}
