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/20, of losing then the Best Kelly factor, that will minimize your expected stay at the casi\ no, followed by that expected duration is [1/10, 85.07082603] This took, 1.556, seconds.