The approach to solving the problem