In 2004, at the age of 32, London-based Ashley Revell sold all his belongings, including his clothes, went to the roulette wheel of the Plaza Hotel & Casino in Las Vegas (Nevada, USA) and put US$135,300 on the color red. With this he took the risk of losing everything or doubling the amount. The ball landed on 7 red, with which Revell doubled his capital to US$270,600.
Meanwhile, a large crowd had gathered around the table, eagerly awaiting another Revell bet. However, he gave US$600 to the dealer, thanked him and left the casino.
Revell did not use his profit to get started as a professional poker player, but to set up his own online poker company called Poker UTD, which later went out of business in 2012.
The first line contains a natural number that indicates the starting capital of a player at a roulette wheel.
The player then bets (part of) his capital over and over again on one specific color: red or black. If the player has bet on the correct color, he doubles his input. Otherwise he loses his input. Each turn is described by three lines that respectively contain the following information:
the amount of money the player bets; this amount can be described by a natural number or by the word all if the player bets his entire capital
the color he bets on: red or black
the color the ball lands on: red or black
In total, the player bets zero or more times. If he chooses to stop betting himself, another line follows containing the word stop.
The player stops betting if he chooses to stop himself (indicated by a line containing the word stop) or if he runs out of money. In those cases, write a line that is formatted as
You end up with amount dolor.
where the italic fragment must be filled up by the final capital of the player.
No further bets are made if the player tries to bet more money than he has in a particular turn. In that case, write a line that is formatted as
You cannot bet input dollar if you only have amount dollar.
where the two italic fragments must be filled up respectively by the amount of money that the player wanted to bet and the capital of the player at the start of the turn.
Input:
135300
all
black
black
150000
black
black
all
red
red
stop
Output:
You end up with 841200 dollar.
Input:
135300
all
black
black
all
black
black
600000
red
red
stop
Output:
You cannot bet 600000 dollar if you only have 541200 dollar.