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.

Let me show it this way:
Scenario #1 - You win
Good job! you made money and can go home with your winnings
Scenario # 2 - You lose
you are a dollar down, so you bet two dollars, if you win then you lose $1, then won a two dollars, net profit is 1 dollar, you can go home now
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
