On average, how many flips of a fair coin (heads or tails) are needed to observe the sequence HTH (Heads–Tails–Heads) for the first time?