#include <bits/stdc++.h>
using namespace std;
int sum[2001];
int main() {
  for (int i = 0; i < 1001; ++i) {
    for (int j = 0; j < 1001; ++j) {
      sum[i + j]++;
    }
  }
  int n;
  while (cin >> n) {
    int ans = 0;
    for (int i = 0; i <= n; ++i) {
      for (int j = 0; i + j <= n; ++j) {
        ans += sum[n - i - j];
      }
    }
    cout << ans << endl;
  }
  return 0;
}
