Let x1,x2,…,xnx_1, x_2, \ldots, x_n be real numbers satisfying the conditions

∣x1+x2+⋯+xn∣=1|x_1 + x_2 + \cdots + x_n| = 1

and

∣xi∣≤n+12i=1,2,…,n.|x_i| \leq \frac{n+1}{2} \qquad i = 1, 2, \ldots, n.

Show that there exists a permutation y1,y2,…,yny_1, y_2, \ldots, y_n of x1,x2,…,xnx_1, x_2, \ldots, x_n such that

∣y1+2y2+⋯+nyn∣≤n+12.|y_1 + 2y_2 + \cdots + ny_n| \leq \frac{n+1}{2}.