$\begin{array}{l}\text { Example 4. Find } S=1+\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{3}}+\text {. } \\ +\frac{1}{\sqrt{1002001}} \text { the integer part of } S. \\\end{array}$
Solve the inequality:
$$
\begin{array}{l}
2(\sqrt{k+1}-\sqrt{k})<\frac{1}{\sqrt{k}} \\
<2(\sqrt{k}-\sqrt{k-1}) \\
\end{array}
$$

By setting \( k=1,2, \cdots, 1002001 \), we get:
$$
\begin{array}{l}
2(\sqrt{2}-\sqrt{1})<\frac{1}{\sqrt{1}} \leqslant 1, \\
2(\sqrt{3}-\sqrt{2})<\frac{1}{\sqrt{2}} \\
<2(\sqrt{2}-\sqrt{1}), \\
\cdots \cdots \\
2(\sqrt{1002002}-\sqrt{1002001}) \\
<\frac{1}{\sqrt{1002001}}<2(\sqrt{1002001} \\
-\sqrt{1002000}) .
\end{array}
$$

By summing up, we know \( 2000 < S < 2001 \). Therefore, the integer part of \( S \) is 2000.