You first flip a coin and the outcome (H or T) is recorded. You keep flipping until the first outcome is repeated, ending the game. You get paid $1 for each time you flipped the opposite outcome. What do you expect to win?
Also if the coin is biased with P(H) = p, what do you expect to win?