Optimize problem 91