Find the real number $k$ such that $f(x) = f(k - x)$ for all real numbers $x$, where \[f(x) = 2x^2 + 7x + x^3 - 5x + 18x.\]