Problem

Source: 2021 Czech-Polish-Slovak Match Junior, team p2 CPSJ

Tags: number theory, divisible, divides



Let the numbers $x_i \in \{-1, 1\}$ be given for $i = 1, 2,..., n$, satisfying $$x_1x_2 + x_2x_3 +... + x_{n-1}x_n + x_nx_1 = 0.$$Prove that $n$ is divisible by $4$.