Geometric Series-Bounce Height of a Ball A ball is dropped from a height of $20 \, \mathrm{m}$. It rebounds to a height of $16 \, \mathrm{m}$ and continues to rebound to eight-tenths of its previous height for subsequent bounces.
Calculate the total distance the ball travels before it comes to rest. 
How do you answer this question? 
I'm using the formula
$$
S_n = \frac{a(1-r^n)}{1-r}, \qquad   r\lt 1
$$
I believe that the variables:
$$
\begin{align}
a &= 20 \\
r &= 0.8 \\
n &= \text{undefined}
\end{align}
$$
The answer is meant to equal $100 \, \mathrm{m}$ so, $S_n = 100 \, \mathrm{m}$.
Please help.
Thank you in advance. 

You need the sum of the infinite geometric series given by
$$S=20+\frac{8}{10}\times20+\left(\frac{8}{10}\right)^2\times20+\cdots$$
For a geometric series
$$S=a+ar+ar^2+\cdots$$
The $N^{th}$ partial sum is given by
$$S_N=a+ar+ar^2+\cdots+ar^{N-1}=\frac{a(1-r^N)}{1-r}$$
Then,
$$S=\lim_{N\to\infty}S_N=\lim_{N\to\infty}\frac{a(1-r^N)}{1-r}$$
If $|r|<1$, the limit exists and is given by,
$$S=\frac{a}{1-r}$$
Hence, here
$$S=\frac{20}{1-\frac{8}{10}}=100$$
