Expected Number of Trials
Denote by $E_i$ the expected number of turns it takes get to the $N$th floor from the $i$th floor. You are interested in $E_1$. The numbers $E_i$ satisfy the recurrence
$$
E_i = 1 + p_i E_{i+1} + (1-p_i)E_1,
$$
valid for $i &lt; N$, with a base case $E_N = 0$.

In order to solve this system of equations, multiply the $i$th equation by $p_1 \cdots p_{i-1}$ to get
$$
p_1 \cdots p_{i-1} E_i = p_1 \cdots p_{i-1} + p_1 \cdots p_i E_{i+1} + [p_1 \cdots p_{i-1} - p_1 \cdots p_i] E_1.
$$
Summing this for $1 \leq i \leq n-1$, we get
$$
E_1 = 1 + p_1 + p_1p_2 + \cdots + p_1 \cdots p_{n-2} + (1 - p_1 \cdots p_{n-1}) E_1,
$$
and so
$$
\begin{align}
E_1 &amp;= \frac{1+p_1+p_1p_2\cdots+p_1\cdots p_{n-2}}{p_1 \cdots p_{n-1}} \\ &amp;= \frac{1}{p_1 \cdots p_{n-1}} + \frac{1}{p_2 \cdots p_{n-1}} + \cdots + \frac{1}{p_{n-1}}.
\end{align}
$$