Let $a_1,a_2,\ldots, a_{2013}$ be a permutation of the numbers from $1$ to $2013$. Let $A_n = \frac{a_1 + a_2 + \cdots + a_n}{n}$ for $n = 1,2,\ldots, 2013$. If the smallest possible difference between the largest and smallest values of $A_1,A_2,\ldots, A_{2013}$ is $\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers, find $m+n$.

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