Also, there is another point I want to make, lot of readers assume that they can only play it once. I dont think that is a constraint at all. If that is a constraint, problem is simplified. If you were to play only once you have less than 1/(amount) chance of seeing your investment or more.
If you invested 1024$ (10 successive head rolls), you have less than 1/1024 chance of seeing it back.
Of course, you start from 2$ and not 0$ (I have simplified a few things to drive the point).