## An almost surly fine-time game of coin toss where you win with probability $p$

Given a fair coin and a number $$p\in(0,1)$$. How do you Design a game that finishes in finite number of tosses with probability $$1$$. And further, with probability $$p$$ you win the game.

I thought about random walks where head, you add 1, tail you subtract 1. And you want to get to $$n$$. But that gives an approximation to $$p$$ and not $$p$$.