Solve problem 17