Bakayev E.V.

A secret base is surrounded by a transparent winding fence in the shape of a non-convex polygon, with a swamp outside. A straight power line consisting of 36 poles runs through the swamp, some of which are outside the base, and some are inside. (The power line does not pass through the vertices of the fence.) A spy walks around the base along the fence from the outside, keeping the fence always to his right. Each time he reaches the power line, he counts how many poles are to his left (he can see all of them). By the time the spy has walked around the entire fence, he has counted a total of 2015 poles. How many poles are inside the base?
A straight power line crosses the territory of the base in several segments. When the spy is at the end of one of these segments, he counts the poles. Consider one of them ($AB$). When the spy is at point $A$, he counts the poles on one side of $AB$, and when he is at point $B$, he counts the poles on the other side of $AB$. If the poles inside $AB$ are added to these, a total of 36 poles are obtained. Summing these equations for all segments, we get that 2015 plus the number $n$ of poles inside the base is divisible by 36. Since $n \leq 36$ and 2016 is divisible by 36, then $n=1$.

## Answer

## Problem