4. Let $x$ and $y$ be real numbers, and satisfy
$$
\left\{\begin{array}{l}
(x-1)^{3}+2015(x-1)=-1, \\
(y-1)^{3}+2015(y-1)=1 .
\end{array}\right.
$$

Then $x+y=$
4. 2 .

Notice that the function $f(z)=z^{3}+2015 z$ is a monotonically increasing function on $(-\infty,+\infty)$.
From the given condition, we have $f(x-1)=f(1-y)$.
Therefore, $x-1=1-y \Rightarrow x+y=2$.