
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
For non-negative integers $n$, the function $f(n)$ is defined by $f(0) = 0$, $f(1) = 1$, and $f(n) = f\left(\left\lfloor \frac{1}{2} n \right\rfloor \right) + n - 2\left\lfloor \frac{1}{2} n \right\rfloor$. Find the maximum value of $f(n)$ for $0 \leq n \leq 1997$.

Present the answer in LaTex format: \boxed{Your answer}
user