Find the sum of all values of $a + b$, where $(a, b)$ is an ordered pair of positive integers such that $a^2 + \sqrt{2017 - b^2}$ is a perfect square.

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