While finding the sine of a certain angle, an absent-minded professor actually needed the cosine, and his calculator was not in the correct angular mode either. He was lucky to get the right answer. The two least positive real values of $x$ for which the sine of $x$ degrees is the same as the cosine of $x$ radians are $\frac{m\pi}{n-\pi}$ and $\frac{p\pi}{q+\pi}$, where $m$, $n$, $p$, and $q$ are positive integers. Find $m+n+p+q$.
← Back to Problem 1,023