Add a solution to the problem 51