
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
Given a sequence $\{x_n\}$ that satisfies $x_{n+2}=|x_{n+2}-x_n|$ (where $n \in \mathbb{N}^*$), if $x_1=1$, $x_2=a$ (where $a \leqslant 1$ and $a \neq 0$), and $x_{n+3}=x_n$ for any positive integer $n$, then the sum of the first 2017 terms of the sequence $\{x_n\}$ is ______.

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