You are given an unbiased fair coin, ie., a coin that produces heads with probability 0.5. Can you use this coin to simulate a biased coin that produces heads with some given probability $p$ ?

This is a reversal of my previous puzzle. Thanks to happystar for the idea. [Simulating an unbiased coin with a biased one](https://puzzling.stackexchange.com/questions/110091/simulating-an-unbiased-coin-with-a-biased-one)