3. Let the function be
$$
f(x)=x^{3}+a x^{2}+b x+c \quad (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$
3. 18 .

Let $g(x)=f(x)-x^{3}=a x^{2}+b x+c$.
From the problem, we have $g(a)=g(b)=0$.
Thus, $g(x)=a(x-a)(x-b)$
$\Rightarrow b=-a(a+b), c=a^{2} b$
$\Rightarrow b=-\frac{a^{2}}{a+1}=1-a-\frac{1}{a+1}$.
Since $b$ is an integer, we have $a+1= \pm 1$.
Also, $a \neq 0$, so $a=-2, b=4, c=16$.
Therefore, $a+b+c=18$.