3. Given the function $f(x)=f_{1}(x)=|1-2 x|$, $x \in[0,1]$. When $n \geqslant 2$, $f_{n}(x)=f\left(f_{n-1}(x)\right)$, $x \in[0,1]$. Then the number of real solutions to the equation $f_{2007}(x)=\frac{1}{2} x$ is . $\qquad$
$3.2^{2007}$
First, $f_{1}(x)=|1-2 x|, x \in[0,1]$, the range is $[0,1]$. Next, consider the zeros and the variation of the graph of $f_{1}(x)=|1-2 x|$.

It is easy to know that $f_{1}(x)$ has 1 zero at $x=\frac{1}{2}$, and the graph is a broken line composed of two line segments, from 1 to 0, then from 0 to 1.

For $f_{2}(x)=f\left(f_{1}(x)\right)$, since the graph of $f_{1}(x)$ is two line segments from 1 to 0 and then from 0 to 1, it is equivalent to repeating the graph of $f_{1}(x)$ twice, so it should have 2 zeros, and the graph is 4 line segments. For $f_{3}(x)=f\left(f_{2}(x)\right)$, since the graph of $f_{2}(x)$ is 4 line segments from 1 to 0, the graph of $f_{3}(x)$ is equivalent to repeating the graph of $f_{2}(x)$ twice, so it should have 4 zeros, and the graph is 8 line segments...

Therefore, $f_{n}(x)=f\left(f_{n-1}(x)\right)$ has $2^{n-1}$ zeros, and the graph is $2^{n}$ line segments, all of which are between 0 and 1. Thus, $y=\frac{1}{2} x$ and $y=f_{n}(x)$ have $2^{n}$ intersection points in the interval $[0,1]$, so the equation $f_{n}(x)=\frac{1}{2} x$ has $2^{n}$ real solutions.