Let
\[ \frac{p}{q} = \frac{2017}{2-\frac{1}{3-\frac{2}{2-\frac{1}{2-\frac{1}{3-\frac{2}{2-\frac{1}{2-\frac{1}{2-\frac{1}{3-\frac{2}{2-\frac{1}{2-\cdots}}}}}}}}}}}\]
where $p$ and $q$ are relatively prime positive integers. Find $p+q$.

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