Let $A$ denote the set of all integers $n$ such that $1 \leq n \leq 10000$, and the sum of the decimal digits of $n$ is 2. Find the sum of the squares of the elements of $A$.

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