I found this one in the list of IMO'96 (3) problems and decided to have a go at it, but could not complete the solution. So $m$ and $n$ are non-negative integers and $f$ takes values in the same set:
$$f(m + f(n)) = f(f(m)) + f(n)$$
Let $m=n=0$: $$f(f(0))=f(f(0))+f(0)$$ hence $$f(0)=0$$ Now let $m=0$: $$f(f(n))=f(n)$$ therefore: $$f(m+f(n))=f(m)+f(n)$$ Now consider the following possibilities
1) $f(m)=f(n) \implies m=n$ $$f(m+f(n))=f(m)+f(n)$$ $$f(n+f(m))=f(n)+f(m)$$ By symmetry of the RHS: $$f(m+f(n))=f(n+f(m))$$ Hence, by assumption $$m+f(n)=n+f(m)$$ $$f(n)-n=f(m)-m$$ Since the two sides are independent they must be both equal to a constant $$f(n)-n=C$$ $$f(0)=0 \implies C=0 \implies f(n)=n$$ 2) It is the second part where I got confused. I assumed $f(m)=f(n)$ where $m \ne n$, so that $$f(m+f(n))=2f(n)$$ then figure that since RHS does not depend on $m$ whereas LHS does, then $f=C$ and deduced from the original equation that $C$ must be 0. But then I relayed that in fact here I have some particular values of $m$ and $n$ and not just something arbitrary. If anyone can point me in the right direction, I would be grateful.