$n$ people stand in a line, one behind the other. Taller people block the view of shorter ones, making them invisible.

What is the expected number of people who are visible?
Let $X_{n}$ denote the random variable "Number of visible people among $n$ people". What happens when the $n$-th person is added to the end of the queue?

With probability $1 / n$, he is taller than all the others, and with probability ${ }^{n-1 / n}$, he is not the tallest. In the first case, one more person will be visible, and in the second case, the number of visible people will not change. Therefore, $X_{n}=1 /{ }_{n}\left(X_{n-1}+1\right)+{ }^{n-}$ $1 / X_{n-1} \cdot$

Let's move to expectations: $\mathrm{E} X_{n}=\mathrm{E} X_{n-1}+1 / n=\mathrm{E} X_{n-2}+1 / n-1+1 / n=\ldots=\mathrm{E} X_{1}+1 / 2+1 / 3+\ldots+1 / n$. $\mathrm{E} X_{1}=1$, since one person is always visible. Therefore, $\mathrm{E} X_{n}=1+1 / 2+1 / 3+\ldots+1 / n$.

## Answer

$1+1 / 2+1 / 3+\ldots+1 / n$