#K62657. Palindromic Difference

    ID: 31580 Type: Default 1000ms 256MiB

Palindromic Difference

Palindromic Difference

Given an integer \( n \), compute the absolute difference between \( n \) and its reverse. Let \( n' \) denote the integer formed by reversing the digits of \( n \). Formally, you are to compute:

\( \text{result} = |n - n'| \)

If the number is a palindrome (i.e. it reads the same forwards and backwards), the difference will be zero.

The input will be provided via standard input and the output should be printed to standard output.

inputFormat

The input consists of a single integer \( n \) read from standard input. You may assume that \( 0 \leq n \leq 10^9 \).

outputFormat

Output a single integer that represents the absolute difference between \( n \) and its reverse.

## sample
1234
3087