solve problem 52