2. If real numbers $x, y$ satisfy the system of equations
$$
\left\{\begin{array}{l}
(x-1)^{2011}+(x-1)^{2009}+2010 x=4020, \\
(y-1)^{2011}+(y-1)^{2009}+2010 y=0,
\end{array}\right.
$$

then $x+y=$ $\qquad$ .
2. 2 .

Transform the original system of equations into
$$
\begin{array}{l}
\left\{\begin{array}{l}
(x-1)^{2011}+(x-1)^{2009}+2010(x-1)=2010, \\
(y-1)^{2011}+(y-1)^{2009}+2010(y-1)=-2010 .
\end{array}\right. \\
\text { Let } f(t)=t^{2011}+t^{2009}+2010 t(t \in \mathbf{R}) .
\end{array}
$$

Then the function $f(t)$ is a monotonically increasing odd function.
From $f(x-1)=-f(y-1)$, we get
$$
x-1=-(y-1) \Rightarrow x+y=2 .
$$