Solution for the problem #81.