Say your current fortune is F, if you win the next gambling, your fortune becomes F+(2p-1)F=2pF; if you lose, your fortune becomes F-(2p-1)F=2(1-p)F.

กก

If you have totally 3 plays and you win 2, there are some sequences of win and lose:

WWL, WLW, LWW

For anyone above, your fortune becomes

F2/3    =[(x*2p)*2p]*2(1-p)

=[(x*2p) *2(1-p)] *2p

=[x*2(1-p)* 2p]*2p

=(2p)2(2-2p)x.

กก

What about Fj/n? Pj/n is pretty straightforward binomial!

This is the most I can say, good luck!