Consider a gambler who at each gamble is equally likely to either win or lose 1 unit. Suppose the gambler will quit playing when his winnings are either A or −B,A>0,B>0. Use an appropriate martingale to show that the expected number of bets is AB.