2. Let $S$ be a subset of $\{1,2, \ldots, 9\}$ such that the sums of any two elements of $S$ are distinct. For example, the set $\{1,2,3,5\}$ has this property, but the set $\{1,2,3,4,5\}$ does not, because $\{2,3\}$ and $\{1,4\}$ both sum to 5. What is the maximum number of elements that $S$ can contain?