Question 20(SWE 2) Given the integer $n\gt 1$ and the real number $a\gt 0$, determine the maximum of $\sum_{i=1}^{n-1}x_ix_{i+1}$ taken over all nonnegative numbers $x_i$ with sum $a$.