Solved the problem on cutting sticks down to zero