Need Help With This Puzzle.... Thanks!

Hi there,

A friend just asked me this riddle, and after some time, I managed

to solve it by sheer guess work. lol.. (Smirk) But it is still bugging me.

Which explains why I googled for Maths forums and found this site

at 4 am in the morning here.. (Rofl)

What is the shortest way of solving this problem and does it fall

in to a particular type of maths problem?

**Here it goes. **

You have X number of chips and you are about to visit three different

games. Arriving at the first game, you receive a house bonus and your

chips double. Felling happy, you bet Y number of chips and loose. (Crying)

Cutting your losses short, you leave this game with the remaining chips.

Now, arriving at the next game, you receive another house bonus and your

chips double again. Once again you bet Y number of chips and loose. :)

Time to leave and head to the last game.

The same thing happens at the third game. You get a house bonus and your

chips double. You bet the same amount as before (Y) and lose.

At this point you have no more chips. (Headbang)

So basically, what is the value of X and Y?

Thanks,

John