#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  while (cin >> n) {
    long long ans = 0;
    for (int a = 0; a <= 1000; a++) {
      for (int b = 0; b <= 1000; b++) {
        if (a + b > n) continue;
        ans += (n - a - b) + 1;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
