If $a_0 = \sin^2 \left( \frac{\pi}{45} \right)$ and
\[a_{n + 1} = 4a_n (1 - a_n)\]for $n \ge 0,$ find the smallest positive integer $n$ such that $a_n = a_0.$

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