Solve problem 21