Let there be $n$ Bernoulli trials in some experiment. Define $Y$ as the maximum number of consecutive successes in our experiment. So if $n=10$ and each trial $X_i$ is distributed iid with $X_i \sim \text{Bernoulli}(0.5)$, then our sample could be $(1, 1, 0, 0, 0, 1, 1, 1, 0, 1)$ and $Y=3$.
What is $E[Y]$?