I am working on a problem that is similar to the gambler's ruin problem.
We start with a bet of $\$1$.
With probability $p$ the game is won and we win the amount of the bet, i.e., if we bet $\$1$, we win $\$2$.
With probability $1-p =: q$ the game is lost.
If we win the game, we take our earnings and stop playing. If we lose we double our bet and keep on playing until we lose.
What is the expected amount we bet in total?
I would argue that the formula for the total bet looks like this, but I'm not sure if I made a mistake somewhere, as it would give negative bet values for a small $p$.
Many thanks for your time and help!