You are asked to play the following game: a fair coin is repeatedly flipped and after each flip you can decide to stop the game or continue. When you stop, you receive a proportion of the pot equal to the proportion of heads seen.
What is the optimal strategy?