Let $x,$ $y,$ $z$ be real numbers such that

\begin{align*}
x + xy + xyz &= 15, \\
y + yz + xyz &= -3, \\
z + zx + xyz &= 17.
\end{align*}
Find the sum of all possible values of $x + y + z.$

We can rewrite these equations in the form

\begin{align*}
x(1 + y + yz) &= 15, \\
y(1 + z + zx) &= -3, \\
z (1 + x + xy) &= 17.
\end{align*}Solving for $y,$ $z$ from the second and third equations, respectively, we get
\begin{align*}
\frac{-3}{y} &= 1 + z + zx, \\
\frac{17}{z} &= 1 + x + xy.
\end{align*}Multiplying these equations, we get
\[\frac{-51}{y} = (1 + z + zx)(1 + x + xy).\]Hence,
\begin{align*}
51 + 51z + 51zx &= -y - yz - yzx - xy - xyz - xz - z - zx - zxy, \\
&= -(x + y + z + xy + yz + zx + xyz).
\end{align*}This becomes
\begin{align*}
x + y + z + xy + yz + zx + xyz &= -(51 + 51z + 51zx + y + xy + xyz - x - yz - xz - z - zx - zxy) \\
&= -51 - y(1 + z + zx) - x(1 + z + zx) - z(1 + x + xy) \\
&= -51 - \frac{3}{y} - \frac{15}{x} - \frac{17}{z} \\
&= -51 - \frac{3}{y} + \frac{15}{-y - 1 - z} - \frac{17}{z} \\
&= -\frac{y(y + 1 + z) - 3y + 15 (y + 1 + z) + 17 (y + 1 + z)}{y (y + 1 + z) - y - z} \\
&= -\frac{33 (y + 1 + z)}{y(y + 1 + z) - y - z}.
\end{align*}To get $x + y + z,$ we want the denominator to be 1. Setting
\[y(y + 1 + z) - y - z = (y + 1 + z)(y - 1) - (y + 1) = 0,\]we find $y = -1.$ Then the equations $y + yz + xyz = -3$ and $z + zx + xyz = 17$ become $z = -yz - 1 = 2$ and $z = xy + 17,$ respectively. Substituted back into the original equations, we can solve to get $x = 3$ or $x = \frac{5}{4},$ respectively. Thus, the solutions are $(x,y,z) = \left(3,-1,2\right)$ and $(x,y,z) = \left(\frac{5}{4},-1,2 - \frac{5}{4}\right) = \left(\frac{5}{4},-1,\frac{3}{4}\right),$ and the sum of all possible values of $x + y + z$ is $\boxed{\frac{27}{4}}.$