Calculate the mathematically optimal bet size to maximize long-term bankroll growth while managing risk.