3. Let $S=\left\{r_{1}, r_{2}, r_{3}, \cdots, r_{n}\right\} \subseteq\{1,2,3, \cdots, 50\}$, and any two numbers in $S$ do not sum to a multiple of 7, then the maximum value of $n$ is $\qquad$ .
3. Classify the elements of $\{1,2, \cdots, 50\}$ by their remainders modulo 7, which can be divided into 7 categories: $F_{0}, F_{1}, \cdots$, $F_{6}, F_{r}(r=0,1, \cdots, 6)$ represents the set of all elements with remainder $r$. Thus, $S$ can contain at most one element from $F_{0}$, 8 elements from $F_{1}$, 7 elements each from $F_{2}(F_{5})$ and $F_{3}(F_{4})$, i.e., it can contain at most $1+8+7+7=23$ elements.