Let $a_1$, $a_2$, $\cdots$ be a sequence such that $a_1 = a_2 = \frac{1}{5}$, and for $n \ge 3$,  
\[a_n = \frac{a_{n-1} + a_{n-2}}{1 + a_{n-1}a_{n-2}}.\]  
Find the smallest integer $n$ such that $a_n > 1 - 5^{-2022}$.

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