If \( \alpha, \beta, \gamma \) are the roots of the equation
\[
x^3 + 3x^2 - 10x - 24 = 0.
\]
If \( \alpha(\beta + \gamma), \beta(\gamma + \alpha) \), and \( \gamma(\alpha + \beta) \) are the roots of the equation
\[
x^3 + px^2 + qx + r = 0,
\]
then find the value of \( q \).