Expected winnings of betting game

The game rules are: bet an amount, flip a fair coin, if heads I win the bet and get the amount, if tails I lose the bet and pay the amount. I quit after getting my first head. If I lose, I double the bet and play again. What are my expected earnings (start with a $1 bet)? I visualized a few rounds and saw that I can play until I get net \$1 back. So I always can regain my losses. So I think expected earnings is $1$? I'm not sure how to justify this answer.

Conclusion

this is called the Martingale system, and is primarily used for blackjack, but has the same principal: if your original stake is one, then you keep doubling and your profit will always be 1 (unless there is a maximum bet rule) because in the series 1 + 2 + 4 + 8 + 16... the sum of all the previous terms PLUS ONE equals the next term, and that is why you should always profit

• ok but is there a way to show the pmf of this? – MoronicHero Oct 8 '16 at 17:50
• @MoronicHero show that for any given term in the series 1 + 2 + 4 + 8... that all the previous terms added together will never be more than the next term, or specifically, always one less, or that if your term is N, then the previous is N/2, then before that is N/4 and befor ethat is N/8... which is a sequence we all know aproaches one, but never reaches it – Cursed Oct 8 '16 at 17:52