Consider the sum $$S =\sum^{2021}_{j=1} \left|\sin \frac{2\pi j}{2021}\right|.$$
The value of $S$ can be written as $\tan \left( \frac{c\pi}{d} \right)$ for some relatively prime positive integers $c, d$, satisfying $2c < d$. Find the value of $c + d$.

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