Codeforces Problem

Can you please explain proof of Problem A according to this Editorial ! I solved this problem by iterating for b but i’m not able to understand this logic .