#include <bits/stdc++.h>
using namespace std;
int arr[4001];
void set() {
  for (int i = 0; i <= 2000; i++) {
    arr[i] = 2001 - (int)abs(i - 2000);
  }
}
int main() {
  set();
  int n;
  while (cin >> n) {
    long long int ans = 0;
    for (int i = 0; i <= n; i++) {
      ans += arr[i] * arr[n - i];
    }
    cout << ans << endl;
  }
  return 0;
}
