Solve problem 22