Solution by maromex.
Observe that this is equivalent to
f(f(x)+f(y))=x+f(y)
for all real x,y such that if x=0 then y=0.
Let P(x,y) be the assertion f(f(x)+f(y))=x+f(y) where x=0 or y=0.
Comparing P(x,y) with P(y,x), we get x+f(y)=y+f(x) for all x,y=0. So
f(x)=x+C
for all x=0 for some real constant C.
Taking P(x,x) for some sufficiently large x, we get 2x+3C=2x+C. So C=0. Therefore f(x)=x for all x=0.
Case 1: f(0)=0
We have f(x)=x for all real x. This function works.
Case 2: f(0)=0
P(−f(0),0):f(0)=0, a contradiction.
So f(x)=x for all real x.