A person continually flips a coin until a run of 3 consecutive heads appears. Assuming that each flip independently lands heads with probability $p$, determine the expected number of flips required.
HINT: Let $T$ denote the first flip that lands on tails and let it be 0 if all flips land on heads, and then condition on $T$.