Minor optimization
Add a solution to the problem 58