Add a solution to the problem 54 (initial version)