problem 54 solution