A gambler has in his pocket a fair coin and a two-headed coin. He selects one of the coins at random, and flips it three times. What is the probability that the coin he selected was the fair coin given that a head occurred on each of the three tosses?