For each $n \in \mathbb{N}$, let $d_n$ denote the gcd of $n$ and $(2019-n)$. Find the value of $d_1 + d_2 + \cdots + d_{2018} + d_{2019}$.

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