Solve problem 2.