#include <bits/stdc++.h>
using namespace std;
const int N = 1000;
int main() {
  int n;
  while (cin >> n) {
    int fir[N * 2];
    memset(fir, 0, sizeof(fir));
    for (int i = 0; i < (int)(N); ++i)
      for (int j = 0; j < (int)(N); ++j) ++fir[i + j];
    int ans = 0;
    for (int i = 0; i < (int)(N); ++i) {
      for (int j = 0; j < (int)(N); ++j) {
        int cd_sum = i + j;
        if (n - cd_sum >= 0) ans += fir[n - cd_sum];
      }
    }
    cout << ans << endl;
  }
  return 0;
}
