Solve problem 1.