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$ .

Asked MS to whitelist my mail server. Got back a reply that I don’t understand. Can anybody toss me a clue?

Text is below.

I have no idea what this means. Did they do something? Do I need to do something?

Please note that your ticket number is in the subject line of this mail.

nnn.nnn.nnn.nnn/32 (nnn.nnn.nnn.nnn is my mail server’s IP Address)

Note: Errors are unlikely, however, if an error is indicated, please resubmit the specific IP or IP range.

Thank you,