p := 5/9 N := 100 x := 1/2 h := 1/50 If the prob. of winning a round is , 5/9 The exit capital is, 100 You currently have, 50, dollars You are willing to take a chance of up to, 1/1000, of losing then the Best Kelly factor, that will minimize your expected stay at the cas\ ino, followed by that expected duration is [1/25, 162.9752299] This took, 1.158, seconds.