For each $x$ in $[0,1]$, define
\[ f(x) = \begin{cases} 2x, & \text{if } 0 \leq x \leq \frac{1}{2}; \\
2 - 2x, & \text{if } \frac{1}{2} < x \leq 1. \end{cases} \]
Let $f^{[2]}(x) = f(f(x))$, and $f^{[n + 1]}(x) = f^{[n]}(f(x))$ for each integer $n \geq 2$. Find the number of values of $x$ in $[0,1]$ for which $f^{[2005]}(x) = \frac{1}{2}$. The original answer is in the form of $k^m$, please provide the value of $k + m$.

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