$q$ is the smallest rational number having the following properties:

1. $q > \frac{31}{17}$

2. When $q$ is written in its reduced form $\frac{a}{b}$, then $b < 17$.

Find $a + b$.

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