Problem

Source: XII International Festival of Young Mathematicians Sozopol 2023, Theme for 10-12 grade

Tags: functional equation, algebra



Find all functions $f: \mathbb{Z} \to \mathbb{Z}$ such that \[ f(x) + f(y - 1) + f(f(y - f(x))) = 1 \]for all integers $x$ and $y$.