
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 any nonnegative integer  $n$ , let  $S(n)$  be the sum of the digits of  $n$ . Let  $K$  be the number of nonnegative integers  $n \le 10^{10}$  that satisfy the equation
 \[
        S(n) = (S(S(n)))^2.
 \]
Find the remainder when  $K$  is divided by  $1000$ .

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