For $n \geq 1$, let $a_n$ be the number beginning with $n$ 9's followed by 744; for example, $a_4 = 9999744$. Define \[ f(n) = \max \{ m \in \mathbb{N} \mid 2^m \text{ divides } a_n \}, \] for $n \geq 1$. Find $f(1) + f(2) + f(3) + \cdots + f(10)$.

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