#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    long long ans = 0;
    for (int cut = 0; cut <= n; cut++) {
      int count1 = 0;
      for (int i = 0; i <= min(1000, cut); i++) {
        count1++;
      }
      int count2 = 0;
      for (int i = 0; i <= min(1000, n - cut); i++) {
        count2++;
      }
      ans += count1 * count2;
    }
    cout << ans << endl;
  }
  return 0;
}
