Suppose we change +1 to -1 in a square. Then the product of the numbers in that row changes sign. Similarly, the product of numbers in the column also changes sign. Hence the sum

Decreases by 4 or increases by 4 remains same. Hence the new sum is congruent, to the old sum modulo 4. Let us consider the situation, when all the square have +1. Then S = n + n = 2n = 2(2m + 1) = 4m + 2. This means the sum S is always of the form 4l + 2 for any configuration, Therefore the sum is not equal to 0.