Find all functions $f: \mathbb{Z} \rightarrow \mathbb{Z}$ that satisfy

$$
f(-f(x)-f(y))=1-x-y
$$

for all $x, y \in \mathbb{Z}$.
Substituting $x=y=1$ gives $f(-2 f(1))=-1$. Substituting $x=n, y=1$ gives $f(-f(n)-f(1))=-n$. Now we choose $x=-f(n)-f(1)$ and $y=-2 f(1)$, which gives

$$
f(-f(-f(n)-f(1))-f(-2 f(1)))=1-(-f(n)-f(1))-(-2 f(1))
$$

where the left side can be further calculated as $f(--n--1)=f(n+1)$ and the right side as $1+f(n)+f(1)+2 f(1)=f(n)+3 f(1)+1$. Let $3 f(1)+1=c$, then we have

$$
f(n+1)=f(n)+c
$$

By induction in both directions, it follows that $f(n+k)=f(n)+c k$ for all $k \in \mathbb{Z}$, and with $n=0$ we get that $f(k)=f(0)+c k$ for all $k \in \mathbb{Z}$, so $f$ is a linear function.

To check, we substitute $f(x)=a x+b$ with $a, b \in \mathbb{Z}$. Then the left side of the functional equation becomes

$$
f(-f(x)-f(y))=a(-a x-b-a y-b)+b=-a^{2} x-a^{2} y-2 a b+b
$$

This must be equal to $1-x-y$ for all $x$ and $y$. The coefficient of $x$ must therefore be the same (since with $y$ fixed, the same function of $x$ must stand on both sides), so $-a^{2}=-1$, thus $a=1$ or $a=-1$. With $a=-1$ and $x=y=0$ we get $2 b+b=1$, which does not yield an integer $b$. With $a=1$ and $x=y=0$ we get $-2 b+b=1$ so $b=-1$. Indeed, for $a=1$ and $b=-1$, the left side also becomes $1-x-y$, so the only function that satisfies is $f(x)=x-1$.