Question 116
A function $f: \mathbb{Z} \rightarrow \mathbb{Z}$ satisfies: $f(0)=0$ and
$$
\left|f\left((n+1) 2^{k}\right)-f\left(n 2^{k}\right)\right| \leq 1
$$
for all integers $k \geq 0$ and $n$. What is the maximum possible value of $f(2019)$ ?
$$
\left|f\left((n+1) 2^{k}\right)-f\left(n 2^{k}\right)\right| \leq 1
$$
for all integers $k \geq 0$ and $n$. What is the maximum possible value of $f(2019)$ ?