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

~/algor $ cat problems/while-teskari-son

Reversed number

Easy 1000 ms 64 MB 30%
Share

A positive integer $n$ is given. Find the integer obtained by writing its digits in reverse order. Leading zeros of the result are not written (for example, $1234 \to 4321$, $500 \to 5$).

Reversing the order of the digits of the number

Input

One integer $n$.

Output

One integer — the number with its digits reversed.

Note

$1 \le n \le 2 * 10^{9}$

Examples

Input #1
1234
Output #1
4321
Input #2
500
Output #2
5

Sign in to submit a solution

Signing up is free and takes a minute.