12. (2004 High School League - Liaoning Preliminary) The sum of the maximum and minimum values of the function $f(x)=\frac{\sqrt{2} \sin \left(x+\frac{\pi}{4}\right)+2 x^{2}+x}{2 x^{2}+\cos x}$ is $\qquad$ .