Problem

Source: INMO 2018

Tags: combinatorics



There are $n\ge 3$ girls in a class sitting around a circular table, each having some apples with her. Every time the teacher notices a girl having more apples than both of her neighbours combined, the teacher takes away one apple from that girl and gives one apple each to her neighbours. Prove that, this process stops after a finite number of steps. (Assume that, the teacher has an abundant supply of apples.)