Problem

Source: Hong Kong TST - HKTST 2024 2.4

Tags: functional equation, algebra



Find all functions $f:\mathbb{R}\rightarrow\mathbb{R}$ satisfying the following condition: for any real numbers $x$ and $y$, the number $f(x + f(y))$ is equal to $x + f(y)$ or $f(f(x)) + y$