19. (MEX 1) Let $f(n)$ be a function defined on the set of all positive integers and having its values in the same set. Suppose that $f(f(m)+f(n))=m+n$ for all positive integers $n, m$. Find all possible values for $f(1988)$.
19. We will show that $f(n)=n$ for every $n$ (thus also $f(1988)=1988$ ). Let $f(1)=r$ and $f(2)=s$. We obtain respectively the following equalities: $f(2 r)=f(r+r)=2 ; f(2 s)=f(s+s)=4 ; f(4)=f(2+2)=4 r ; f(8)=$ $f(4+4)=4 s ; f(5 r)=f(4 r+r)=5 ; f(r+s)=3 ; f(8)=f(5+3)=6 r+s$. Then $4 s=6 r+s$, which means that $s=2 r$.
Now we prove by induction that $f(n r)=n$ and $f(n)=n$ for every $n \geq 4$. First we have that $f(5)=f(2+3)=3 r+s=5 r$, so that the statement is true for $n=4$ and $n=5$. Suppose that it holds for $n-1$ and $n$. Then $f(n+1)=f(n-1+2)=(n-1) r+2 r=(n+1) r$, and $f((n+1) r)=f((n-1) r+2 r)=(n-1)+2=n+1$. This completes the induction.
Since $4 r \geq 4$, we have that $f(4 r)=4 r^{2}$, and also $f(4 r)=4$. Then $r=1$, and consequently $f(n)=n$ for every natural number $n$.
Second solution. $f(f(1)+n+m)=f(f(1)+f(f(n)+f(m)))=1+f(n)+$ $f(m)$, so $f(n)+f(m)$ is a function of $n+m$. Hence $f(n+1)+f(1)=$ $f(n)+f(2)$ and $f(n+1)-f(n)=f(2)-f(1)$, implying that $f(n)=A n+B$ for some constants $A, B$. It is easy to check that $A=1, B=0$ is the only possibility.