Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/bolakli-funksiya

Piecewise function

Easy 1000 ms 64 MB 21%
Share

An integer $x$ is given. Compute the value of the piecewise function:

$$f(x) = \begin{cases} -x, & \text{if } x < 0 \\ x^{2}, & \text{if } 0 \le x \le 100 \\ 10000, & \text{if } x > 100 \end{cases}$$

Graph of a piecewise function made of three parts

Input

One integer $x$.

Output

One integer — the value $f(x)$.

Note

$-10^{9} \le x \le 10^{9}$

Examples

Input #1
-5
Output #1
5
Input #2
0
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.