
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
The function  $g$  is defined about the natural numbers and satisfies the following conditions:  $g(2) = 1$  $g(2n) = g(n)$  $g(2n+1) = g(2n) +1.$ Where  $n$  is a natural number such that  $1 \leq n \leq 2002$ . 

Find the maximum value  $M$  of  $g(n).$  Also, calculate how many values of  $n$  satisfy the condition of  $g(n) = M.$ 

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