Hello. Suppose you have n boxes and there are a[i] balls in the i-th box. In one operation you can choose2 balls from 2 different boxes and throw them. Is it possible to perform some number of operations such that in the end a[i] = 0 for all i? I know that the answer is yes iff a[i] <= s/2 for all i, where s is tue sum of a[i]. But why is this condition sufficient? I understand that its not possible to make a[i] = 0 when a[i] > s/2, but why does this guarantee that we will be able to reach the state where all a[i] = 0? Thanks in advance.