A coin that, when flipped, comes up heads with probability p is flipped until either heads or tails has occurred twice. Find the expected number of flips.