The man will leave the casino whenever he wins 1000, which means he will leave the casino after his first win. The man starts to calculate how many times he can bet if he is very unlucky and loses every round.
First round: 1000 total 1000 Second round: 2000 total 3000 Third round: 4000 total 7000 and so on......
The man finds that this is a geometric sequence for each round, and the total lost is a geometric series.
The man knows the formula: S = a * (r^n - 1) / (r - 1)
Where:
S = Sum of the series
a = First term
r = Common ratio
n = Number of terms