If $\frac{30}{7}=x+\frac{1}{y+\frac{1}{z}}$, where $x, y$, and $z$ are positive integers, then what is the value of $x+y+z$ ?
(A) 13
(B) 9
(C) 11
(D) 37
(E) 30
Solution

$$
\begin{aligned}
4+\frac{2}{7} & =4+\frac{1}{\left(\frac{7}{2}\right)} \\
& =4+\frac{1}{3+\frac{1}{2}}
\end{aligned}
$$

Rewrite $\frac{30}{7}$ as

By comparison, $x=4, y=3$ and $z=2$.

Thus, $x+y+z=9$.