Problems
Conditional statement - 4
Conditional statement - 4
Find the value of $y$ according to condition:
$$
y = \begin{cases}
x^3 + 2x^2 +4x - 6, x \ge 0 \\
x^3 - 7x, x < 0
\end{cases}
$$
\InputFile
One integer $x~(-1000 \le x \le 1000)$.
\OutputFile
Print the value of $y$ according to the conditional statement above.
Input example #1
3
Output example #1
51
Input example #2
-2
Output example #2
6