Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that for all real numbers $x, y$

$$
f(f(x)+y)=2 x+f(-f(f(x))+f(y))
$$
Let $y=0$, we obtain $f(f(x))=2 x+f(-f(f(x))+f(0))$. If $f(a)=f(b)$, then $f(f(a))=f(f(b))$ and $f(-f(f(a))+f(0))=f(-f(f(b))+f(0))$ so $2 a=2 b \Longrightarrow a=b$ thus $f$ is injective. Now we return to the original equation and set $x=0$, then we get $f(f(0)+y)=f(-f(f(0))+f(y))$ but $f$ is injective so $f(0)+y=-f(f(0))+f(y)$. Looking at this equality straight in the eye, we realize it almost gives us the expression of $f(y)$ since $f(y)=y+f(0)+f(f(0))$, in particular $f$ is of the form $f(y)=y+c$ with $c=f(0)+f(f(0))$ a constant. The original equation gives $x+y+2 c=x+y$ so $c=0$.

Finally, we verify that the function $f: x \rightarrow x$ is indeed a solution to the equation.