#include <bits/stdc++.h>
using namespace std;
const int dx[] = {1, -1, 0, 0};
const int dy[] = {0, 0, 1, -1};
inline int input() {
  int i;
  scanf("%d%*c", &i);
  return i;
}
inline double dinput() {
  double d;
  scanf("%lf%*c", &d);
  return d;
}
inline void output(int i, char c = '\n') { printf("%d%c", i, c); }
const int INF = 1000000000;
const int MOD = 1000000000 + 0;
int comb[2048];
int main() {
  int n;
  for (int i = 0; i < (1001); i++) {
    for (int j = 0; j < (1001); j++) {
      comb[i + j]++;
    }
  }
  while (~scanf("%d", &n)) {
    int cnt = 0;
    for (int i = 0; i < (n + 1); i++) {
      cnt += comb[i] * comb[n - i];
    }
    output(cnt);
  }
  return 0;
}
