Competitions
Week 2 Conditionals Part 2
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}
Input data
One integer x~(-1000 \le x \le 1000).
Output data
Print the value of y according to the conditional statement above.
Examples
Input example #1
3
Output example #1
51
Input example #2
-2
Output example #2
6