Solution to the predict the number problem.