How to solve the example correctly