# Stairway to heaven

**Calculus**Level 5

Let \(P_{n}\) for any positive integer \(n\) describe a particle's "stairway" path as follows:

A particle, starting at the origin of a standard \(xy\)-grid, first moves east, (i.e., in the positive \(x\)-direction), then up, (i.e., in the positive \(y\)-direction), then east, up, and so on for a total of \(n\) moves, such that the \(k\)-th move has length \(\displaystyle \frac{1}{\sqrt{kn}}\) for \(1 \le k \le n\).

Now let \(D_{n}\) be the displacement between the starting and finishing points, and let \(|P_{n}|\) be the total distance traveled.

If \(\displaystyle S = \lim_{n \rightarrow \infty} (|P_{n}| - D_{n})\), then find \(\lfloor 1000S \rfloor\).