The perfect square game is played as follows: player 1 says a positive integer, then player 2 says a strictly smaller positive integer, and so on. The game ends when someone says 1; that player wins if and only if the sum of all numbers said is a perfect square. What is the sum of all $n$ such that, if player 1 starts by saying $n$, player 1 has a winning strategy? A winning strategy for player 1 is a rule player 1 can follow to win, regardless of what player 2 does. If player 1 wins, player 2 must lose, and vice versa. Both players play optimally.

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