For a positive integer $n$, let $a_n$ be the integer consisting of $n$ digits of $9$ followed by the digits $488$. For example, $a_3 = 999488$ and $a_7 = 9999999488$. Find the value of $n$ such that $a_n$ is divisible by the highest power of $2$.

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