
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 positive integer \( n \), define
\[ 
S(n) = \left\lfloor \frac{n}{10^{[\lg n]}} \right\rfloor + 10 \left( n - 10^{[\lg n]} \left\lfloor \frac{n}{10^{[\lg n]}} \right\rfloor \right).
\]
Then, among the positive integers \( 1, 2, \ldots, 5000 \), the number of positive integers \( n \) that satisfy \( S(S(n)) = n \) is ______.

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