2. Set $A$ is a subset consisting of 40 elements from $\{1,2,3, \cdots, 50\}$, and $S$ is the sum of all elements in set $A$. Then the number of possible values for $S$ is $\qquad$.
$S \geqslant 1+2+\cdots+40=20 \cdot 41=820, S \leqslant 11+12+\cdots+50=20 \cdot 61=1220$, obviously in the set $A$ and $\{1,2,3, \cdots, 50\} \backslash A$ there exist replaceable elements $k$ and $k+1$, so the number of possible values for $S$ is 401.