Consider the integer\[N = 9 + 99 + 999 + 9999 + \cdots + \underbrace{99\ldots 99}_\text{321 digits}.\]Find the sum of the digits of $N$.

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