Let $a > b > c > d$ be positive integers satisfying $a + b + c + d = 502$ and $a^2 - b^2 + c^2 - d^2 = 502$. Calculate how many possible values of $a$ are there.

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