TITLE: Coin Flip Betting System
QUESTION [5 upvotes]: -Read comments before posting
I came up with a betting system that seems to defy logic... explain why its wrong?
Here's the "logic" behind it
Rule: If you flip a coin enough times(x) the number of heads(H) and tails(T) will be equal to each other (law of large numbers?)
H + T = x  AND 1/2H = 1/2T AND 1/2H / 1/2T = 1

This could happen at after flipping HT or THTTHH or HHTHTHTT... extra
And Now The System!!!
The first bet(more like lack of bet) you make is for $0, you have 1/2H / (1/2H + 1/2T) chance of getting heads.
The coin flips tails.  Therefor x is now x-1 and T is now T-1 and H is still the same.  So now you have 1/2H / (1/2H + 1/2T - 1) chance of flipping heads.  Because 1/2H / (1/2H + 1/2T) = 50% chance of flipping heads and 1/2H / (1/2H + 1/2T - 1) is not equal to 1/2H / (1/2H + 1/2T) then 1/2H / (1/2H + 1/2T - 1) is not equal to a 50% chance of flipping heads.  How can this be?
PLEASE do not say every time the next flip will be heads or tails, therefor you have a 50% chance of flipping heads... of course I know this!!!  I want to know what is wrong with my logic not that it is wrong, I already know that it is wrong...
On a side note this system would never work in a real life senario because no casino offers 1:1 odds which this system needs.
The system itself is

Watch first flip
Bet on opposite of flip amount of money you want to profit
Continue making bet until heads and tail flips are equal

REPLY [4 votes]: You are taking a One-Dimensional Random Walk on the integers, starting at 0.  With probability 1, you will visit every integer infinitely often, including the starting point, but also the point where you're broke.  Curiously, if the random walk is expanded to two dimensions, the same result holds, but in three dimensions it's only a 34% chance to return back to the origin.