# Almost 0

Consider a $2017 \times 2017$ square grid. Each cell is filled in with a real number with absolute value at most 1, such that the sum of any $2 \times 2$ square grid is exactly 0.

Let $S$ be the sum of all of these real numbers. What is the maximum value of $S$?

Note: Below is a $3 \times 3$ grid which satisfies the requirements above (although its sum is not necessarily maximized).

$\Large \begin{array}{|c|c|c|} \hline -0.3 & 0.2 & -0.6 \\ \hline 0.4 & -0.3 & 0.7 \\ \hline 0.5 & -0.6 & 0.2 \\ \hline \end{array}$

×