An $n$-sided regular polygon with side length $1$ is rotated by $\frac{180^\circ}{n}$ about its center. The intersection points of the original polygon and the rotated polygon are the vertices of a $2n$-sided regular polygon with side length $\frac{1-\tan^2 10^\circ}{2}$. What is the value of $n$?

Let's think step by step and output the final answer within \boxed{}.
user