#include <bits/stdc++.h>
using namespace std;
int t[8100];
int ans = 0;
void solve(int n) {
  for (int c = 1; c <= 1000; c++)
    for (int d = 1; d <= 1000; d++)
      if (t[n - c - d]) ans++;
  cout << ans << endl;
}
int main() {
  int n;
  for (int a = 1; a <= 1000; a++)
    for (int b = 1; b <= 1000; b++) ++t[a * b];
  while (~scanf("%d", &n)) {
    ans = 0;
    solve(n);
  }
  return 0;
}
