A game consists in pushing a flat stone along a sequence of squares $S_0, S_1, S_2, . . .$ that are arranged in linear order. The stone is initially placed on square $S_0$. When the stone stops on a square $S_k$ it is pushed again in the  same direction and so on until it reaches $S_{1987}$ or goes beyond it; then the game stops. Each time the stone is pushed, the probability that it will advance exactly $n$ squares is $\frac{1}{2^n}$. Determine the probability that the stone will stop exactly on square $S_{1987}.$
1. **Understanding the Problem:**
   - The stone starts at $S_0$ and is pushed along a sequence of squares $S_0, S_1, S_2, \ldots$.
   - Each push advances the stone exactly $n$ squares with probability $\frac{1}{2^n}$.
   - We need to determine the probability that the stone stops exactly on square $S_{1987}$.

2. **Modeling the Problem:**
   - Let $P_k$ be the probability that the stone stops exactly on square $S_k$.
   - The stone can reach $S_{1987}$ in multiple pushes, and the sum of the distances of these pushes must be exactly 1987.

3. **Recursive Probability Calculation:**
   - The probability of reaching $S_{1987}$ can be expressed as a sum of probabilities of reaching previous squares and then making a final push to $S_{1987}$.
   - Specifically, if the stone reaches $S_{1987-n}$, the probability of then advancing exactly $n$ squares to $S_{1987}$ is $\frac{1}{2^n}$.

4. **Formulating the Recursive Equation:**
   \[
   P_{1987} = \sum_{n=1}^{1987} P_{1987-n} \cdot \frac{1}{2^n}
   \]
   - Here, $P_{1987-n}$ is the probability of reaching $S_{1987-n}$, and $\frac{1}{2^n}$ is the probability of advancing exactly $n$ squares to $S_{1987}$.

5. **Base Case:**
   - The base case is $P_0 = 1$ because the stone starts at $S_0$.

6. **Solving the Recursive Equation:**
   - This problem can be solved using generating functions or by recognizing a pattern in the probabilities.

7. **Generating Function Approach:**
   - Let $G(x) = \sum_{k=0}^{\infty} P_k x^k$ be the generating function for the sequence $\{P_k\}$.
   - The recursive relation translates to:
     \[
     G(x) = 1 + \sum_{k=1}^{\infty} \left( \sum_{n=1}^{k} P_{k-n} \cdot \frac{1}{2^n} \right) x^k
     \]
   - This can be simplified and solved using properties of generating functions.

8. **Simplifying the Generating Function:**
   - Recognize that the generating function for $\frac{1}{2^n}$ is $\frac{x}{2-x}$.
   - Thus, the generating function $G(x)$ satisfies:
     \[
     G(x) = 1 + x \cdot G\left(\frac{x}{2}\right)
     \]
   - Solving this functional equation gives us the generating function $G(x)$.

9. **Extracting the Coefficient:**
   - The coefficient of $x^{1987}$ in the expansion of $G(x)$ gives us $P_{1987}$.

10. **Final Probability:**
    - After solving the generating function, we find that the probability $P_{1987}$ is:
      \[
      P_{1987} = \frac{1}{2^{1987}}
      \]

The final answer is $\boxed{\frac{1}{2^{1987}}}$.