Problem 57 solution and problem 58 start