Can someone help me understand the following logic using the pigeonhole principle:
If a sequence of $n$ integers $x_1, x_2,...,x_n\;(n\geq2,x_i \geq 0)$ sums to $n^2-3n+2$, then either of the following is true:
at least one $x_i$ satisfies $x_i \geq n-1$
at least two $x_i$ satisfy $x_i =n-2$