#K9396. Reverse Digits

    ID: 38535 Type: Default 1000ms 256MiB

Reverse Digits

Reverse Digits

You are given a non-negative integer n. Your task is to reverse the digits of n and print the resulting integer. Note that any leading zeros in the reversed number should be removed.

For example, if n = 12345, then the output should be 54321. Similarly, if n = 100, then the output is 1.

The reversal operation can be mathematically described as follows:

\[ \text{result} = \sum_{i=0}^{k} d_i \times 10^{i} \]

where n is composed of digits \(d_0, d_1, \ldots, d_k\) (in order from most significant to least significant).

inputFormat

The input consists of a single line containing a non-negative integer n (0 ≤ n ≤ 1018).

The input is provided via stdin.

outputFormat

Output the reversed integer. The output should be printed to stdout.

## sample
12345
54321