Adding solution for problem 57