3. Let the function $f(x)=x^{3}+a x^{2}+b x+c(x \in \mathbf{R})$, where $a, b, c$ are distinct non-zero integers, and $f(a)=a^{3}, f(b)=$ $b^{3}$, then $a+b+c=$ $\qquad$ .
Given that $a, b$ are the roots of the equation $a x^{2}+b x+c=0$ $\Rightarrow\left\{\begin{array}{l}a+b=-\frac{b}{a}, \\ a b=\frac{c}{a}\end{array} \Rightarrow b\left(1+\frac{1}{a}\right)=-a\right.$
$$
\Rightarrow b=\frac{-a^{2}}{a+1}=1-a-\frac{1}{a+1} \in \mathbf{Z} \Rightarrow a=-2, b=4, c=16 \text {. }
$$

Therefore, $a+b+c=18$.