Skip to content
UPEEC

Reverse a Number

Easy#basics#math· solved by 0 · time limit 2.0 s

Reverse the digits of nn. Leading zeros of the result are dropped, and the sign stays in front (so -120 becomes -21).

Input

A single integer nn.

Output

The reversed number.

Constraints

∣n∣≤109|n| \le 10^9

Sample 1

Input

1234

Output

4321

Sample 2

Input

-120

Output

-21

Sign in or join free to run and submit your solution.