Let \(A = \left(I_n - \frac{1}{n}\mathbf{1}\mathbf{1}^T\right)\) be a matrix, where \(\mathbf{1} = (1,1,1,\ldots,1)^T \in \mathbb{R}^n\) and \(I_n\) is the identity matrix of order \(n\).
The value of \(\max_{S} x^TAx\), where \(S = \{x \in \mathbb{R}^n \mid x^Tx = 1\}\), is __________. (Answer in integer)