Each term in the sum is odd, which means that the sum of any four terms is even.
Let S_i be the sum of the four terms that have a_i as a member. Then if a_i is inverted between 1 and -1 then S_i changes to -S_i. Then the total sum changes by -2S_1.
But S_i must be even, which means that the total sum changes by a multiple of 4 when a single element is inverted.
Any possible sum can be arrived at by starting with a_i=1 for all n=1 to n and then inverting the needed a_i's.
The sum when all a_i equal 1 is precisely n.
Inverting elements changes the sum by a multiple of 4 therefore the sum is divisible by 4 exactly when n is a multiple of 4.