This question asks for the maximum of the quadratic form $x^TAx$ over all unit vectors, a classic constrained optimization problem. Instead of jumping straight to eigenvalue facts, let's set it up with Lagrange multipliers first and then work out the actual numbers for this specific matrix $A$.
Setting up the optimization: We want to maximize $f(x) = x^TAx$ subject to $g(x) = x^Tx - 1 = 0$. At the maximum, the gradients must be parallel: $\nabla f = \lambda \nabla g$ for some scalar $\lambda$. Since $A$ is symmetric, $\nabla f = 2Ax$ and $\nabla g = 2x$, so this condition reduces to $Ax = \lambda x$. In other words, the maximizer $x$ must be a unit eigenvector of $A$, and the maximum value of $x^TAx$ equals the corresponding eigenvalue $\lambda$, since at an eigenvector $x^TAx = x^T(\lambda x) = \lambda(x^Tx) = \lambda$.
Finding the eigenvalues by testing vectors directly: Rather than proving the general idempotent-matrix fact first, plug in two natural test vectors.
Squaring $A$ shows $A^2=A$, so for any eigenvalue $\lambda$ we get $\lambda^2=\lambda$, forcing $\lambda \in \{0,1\}$ only. We already found a direction giving 0 and a direction giving 1, so no other value is possible, and the largest achievable value of $x^TAx$ on the unit sphere is 1.
Let's summarize:
So $\max_{S} x^TAx = 1$.
\[ \boxed{1} \]