Let $m$ and $n$ be positive integers such that $x = m + \sqrt{n}$ is a solution to the equation $x^2 - 10x + 1 = \sqrt{x}(x + 1)$. Find $m + n$.

Let's think step by step and output the final answer within \boxed{}.
user