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