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

~/algor $ cat problems/funksiya-ishora

Sign of a number

Easy 1000 ms 128 MB 24%
Share

Write a function Sign(x) that returns $1$ if the integer $x$ is positive, $0$ if it is zero and $-1$ if it is negative.

Example 1: Sign(5) → 1

Example 2: Sign(-3) → -1

Write only the function body.

The number line: -1 for negative numbers, 0 for zero, 1 for positive numbers

Input

One line with an integer $x$ — the argument of the function.

Output

The value returned by the function: $1$, $0$ or $-1$.

Note

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

Examples

Input #1
5
Output #1
1
Input #2
-3
Output #2
-1

Sign in to submit a solution

Signing up is free and takes a minute.