#include <bits/stdc++.h>
using namespace std;
int ans, n;
int mem[5][4001];
int dfs(int x, int cnt, int I) {
  if (cnt == 4 && x == n) return 1;
  if (cnt == 4 || x > n) return 0;
  if (mem[cnt][x]) return mem[cnt][x];
  for (int i = I; i <= 1000; i++) mem[cnt][x] += dfs(x + i, cnt + 1, i);
  return mem[cnt][x];
}
long long dp[6][5001];
int main() {
  while (cin >> n) {
    memset(dp, 0, sizeof(dp));
    dp[0][0] = 1;
    for (int i = 0; i < 4; i++)
      for (int j = 0; j <= n; j++)
        for (int k = 0; j + k <= n; k++) dp[i + 1][j + k] += dp[i][j];
    cout << dp[4][n] << endl;
  }
  return 0;
}
