Question: Martin has just heard about the following exciting gambling strategy: bet $1 that a fair coin will land Heads. If it does, stop. If it lands Tails, double the bet for the next toss, now betting $2 on Heads. If it does, stop. Otherwise, double the bet for the next toss to $4. Continue in this way, doubling the bet each time and then stopping right after winning a bet. Assume that each individual bet is fair, i.e., has an expected net winnings of 0. The idea is that
1 + 2 + 22 + 23 + . . . . + 2n = 2n+1 - 1,
so the gambler will be $1 ahead after winning a bet, and then can walk away with a profit. Martin decides to try out this strategy. However, he only has $31, so he may end up walking away bankrupt rather than continuing to double his bet. On average, how much money will Martin win?