For positive integers $a$ and $N$, let $r(a, N) \in \{0, 1, \dots, N - 1\}$ denote the remainder of $a$ when divided by $N$. Determine the number of positive integers $n \le 1000000$ for which \[r(n, 1000) > r(n, 1001).\]

Let's think step by step and output the final answer within \boxed{}.
user