II. (15 points) Given that $a$ is a positive integer, and $a^{2}+$ $2004 a$ is a perfect square of a positive integer. Find the maximum value of $a$.
Let $a^{2}+2004 a=m^{2}$, where $m$ is a positive integer.
By completing the square and constant transformation, we get
$$
(a+1002)^{2}-m^{2}=1002^{2}=2^{2} \times 3^{2} \times 167^{2} \text{. }
$$

It is easy to see that $a+1002+m$ and $a+1002-m$ are both even numbers, and
$$
a+1002+m>a+1002-m>0 \text{. }
$$

To find the maximum value of the positive integer $a$, we need the sum of $a+1002+m$ and $a+1002-m$ to be maximized, i.e.,
$$
\left\{\begin{array}{l}
a+1002+m=2 \times 3^{2} \times 167^{2}, \\
a+1002-m=2 .
\end{array}\right.
$$

Solving this, we get $m=251000, a=250000$.