We need to find the eigenvalues of matrix \( A \). First, calculate the characteristic equation by finding the determinant of \( A - \lambda I \):
\[
\det(A - \lambda I) = \det \begin{pmatrix}
2 - \lambda & 0 & 1 \\
1 & 2 - \lambda & 5 \\
0 & 3 & -\lambda \\
0 & 0 & 1 - \lambda
\end{pmatrix}
\]
Using the cofactor expansion, we obtain the characteristic polynomial. After solving for the eigenvalues, we find the distinct eigenvalues and their geometric multiplicities. The distinct eigenvalues of \( A \) are:
\[
\lambda_1 = 3, \quad \lambda_2 = 2, \quad \lambda_3 = 1
\]
The geometric multiplicities are:
- For \( \lambda_1 = 3 \), the geometric multiplicity is 1.
- For \( \lambda_2 = 2 \), the geometric multiplicity is 1.
- For \( \lambda_3 = 1 \), the geometric multiplicity is 1.
Thus, the sum of the geometric multiplicities is:
\[
\boxed{3}
\]