Solution to the math problem.