2. (1986, 1st Northeast China Three Provinces Mathematics Invitational) Calculate the sum $\sum_{n=0}^{502}\left[\frac{305 n}{503}\right]$.

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
2. Since 503 is a prime number, when $n=0,1,2, \cdots, 502$, $\frac{305 n}{503}$ is not an integer.

Since $\frac{305 n}{503}+\frac{305(503-n)}{503}=305$, the sum of the fractional parts of $\frac{305 n}{503}$ and $\frac{305(503-n)}{503}$ is 1, thus
$$
\begin{array}{l}
{\left[\frac{305 n}{503}\right]+\left[\frac{305(503-n)}{503}\right]=304 .} \\
\sum_{n=0}^{502}\left[\frac{305 n}{503}\right]=\sum_{n=1}^{502}\left[\frac{305 n}{503}\right]=\sum_{n=1}^{251}\left(\left[\frac{305 n}{503}\right]+\left[\frac{305(503-n)}{503}\right]\right)=304 \cdot 251=76304 .
\end{array}
$$