Alex writes down some distinct integers on a blackboard. For each pair of integers, he writes the positive difference of those on a piece of paper. Find the sum of all $n \leq 2022$ such that it is possible for the numbers on the paper to contain only the positive integers between $1$ and $n$, inclusive, exactly once.

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