How long until the first success? If each trial succeeds with probability ppp, the first success comes on trial rrr with probability (1−p)r−1p(1-p)^{r-1}p(1−p)r−1p: r−1r-1r−1 failures, then a success.