can someone explain in a easier way how to solve this problem . I cant understand the editorial. specifically the part where it says "ai iterations in i-th step is equal to doing ai mod (n - i) iterations (0-based numbering). That is less than n". Please help.