The mathematics of success