5. Determine how many different solutions the equation has

$$
|| \cdots|||x|-1|-2| \cdots-2016|-2017|=2017
$$

## Second Grade - A Category
5. We will use the following observation: if $||y|-a|=b$ and at the same time we have $0<a<b$, then it follows that $|y|=a+b$. Indeed, we have $|y|-a= \pm b$, i.e., $|y|=a \pm b$, but due to $a-b<0$, we are left with $|y|=a+b$.

By removing the last absolute value in the given expression, we obtain $|\ldots||| x \mid-1|-2| \cdots-2016 \mid-2017= \pm 2017$, i.e., $|\cdots||| x|-1|-2|\cdots-2016| \in\{0,4034\}$. Now we will distinguish between these two cases.

In the first case, it follows that $|\cdots||| x|-1|-2|\cdots-2015|=2016$. By applying the observation from the beginning, we get $|\cdots||| x|-1|-2|\cdots-2014|=2016+2015$, and by applying the same observation again, $|\cdots||| x|-1|-2|\cdots-2013|=2016+2015+2014$, etc. In the end, we are left with $|x|=2016+2015+\cdots+1$, so in this case, we have two solutions.

In the second case, in the same way, we get $|x|=4034+2016+2015+\cdots+1$, so here we have two more solutions. Therefore, there are four solutions to the given equation in total.

## Second Grade - A Category