#K76797. Mirror Image of an Integer

    ID: 34722 Type: Default 1000ms 256MiB

Mirror Image of an Integer

Mirror Image of an Integer

You are given a non-negative integer n. Your task is to compute its mirror image. In other words, you need to reverse the digits of the number. The reversal should ignore any leading zeros that might appear after reversing. For example, if n is 100, then its mirror image is 1.

Constraints:

  • 0 ≤ n (n is a non-negative integer)

Note: The solution should read input from stdin and output the result to stdout.

Mathematically, if the digits of n are represented as \( d_1, d_2, \dots, d_k \), then the mirror image \( m \) is given by:

\( m = \sum_{i=1}^{k} d_i \times 10^{i-1} \)

inputFormat

The input consists of a single line containing a non-negative integer n.

outputFormat

Output a single integer which is the mirror image of n.

## sample
12345
54321