5. (26th Russian Mathematical Olympiad) Let $a$, $b$, $c$ be three distinct real numbers such that the equations $x^{2} + a x + 1 = 0$ and $x^{2} + b x + c = 0$ have a common real root, and the equations $x^{2} + x + a = 0$ and $x^{2} + c x + b = 0$ also have a common real root. Find $a + b + c$.
5. If $x_{1}^{2}+a x_{1}+1=0$ and $x_{1}^{2}+b x_{1}+c=0$, then $(a-b) x_{1}+(1-c)=0$. Therefore, $x_{1}=\frac{c-1}{a-b}$. Similarly, from the equations $x_{2}^{2}+x_{2}+a=0$ and $x_{2}^{2}+c x_{2}+b=0$, we derive $x_{2}=\frac{a-b}{c-1}$ (obviously $c \neq 1$). Hence, $x_{2}=\frac{1}{x_{1}}$.

On the other hand, by Vieta's formulas, $\frac{1}{x_{1}}$ is a root of the first equation. This indicates that $x_{2}$ is a common root of the equations $x^{2}+a x+1=0$ and $x^{2}+x+a=0$. Therefore, $(a-1)\left(x_{2}-1\right)=0$. However, when $a=1$, these two equations have no real roots, so it must be that $x_{2}=1$, and thus $x_{1}=1$. Consequently, $a=-2, b+c=-1$, so $a+b+c=-3$.