Find all functions $f: \mathbb{Z} \rightarrow \mathbb{Z}$ such that $f(f(x)+y+1)=x+f(y)+1$ for every two integers $x$ and $y$.
Substituting $x=0$ we get $f(f(0)+y+1)=f(y)+1$. Now we have $x+f(y)+1=f(f(x)+y+1)=$ $f[(f(x)+1)+y]=f[f(f(0)+x+1)+(y-1)+1]=f(y-1)+(f(0)+x+1)+1$ from where we conclude that

$$
f(y)=f(y-1)+f(0)+1 .
$$

Using the induction we obtain $f(n)=f(0)+n(f(0)+1)$ for all integers $n$. If we set $y=0$ in (1) we get $f(-1)=-1$ and substituting $y=-1$ in the original equation yields $f(f(x))=x$. If we apply $f$ to both sides of $f(n)=f(0)+n(f(0)+1)$ we get $n=f(0)+[f(0)+n(f(0)+1)](f(0)+1)$ which is equivalent to $n=f(0)(f(0)+2)+n(f(0)+1)^{2}$ and this can be satisfied for all integers $n$ if and only if $f(0)=0$ or $f(0)=-2$. In the first case we get $f(n)=n$ and in the second $f(n)=-n-2$. It is easy to verify that both functions satisfy the required conditions.