Loading repovive.com/problems/math/8
Each remaining box represents an interval of original boxes and contains as many tokens as the length of that interval. This holds initially, and each move joins two adjacent intervals.
Just before the last move, the two boxes represent a prefix and a suffix. The surviving box must contain no more tokens than the other box, so its interval has length at most ⌊n/2⌋.
If n is odd, every prefix or suffix containing the middle box has length at least (n+1)/2. Therefore, the middle box cannot survive.