G. Elevator Ride
time limit per test
1 second
memory limit per test
512 megabytes
input
standard input
output
standard output

Every time Katya enters the elevator, she sees the reflection of the floor number in the mirror.

The floor number is displayed on a panel, which shows the digits as shown in the picture.

Because the floor number is visible in the mirror, its reflection is reversed with respect to the vertical axis: the order of the digits is reversed and the digits appear as their reflections. However, if a digit $$$x$$$ after reflection completely coincides with another digit $$$y$$$, the brain perceives it as $$$y$$$. But if it does not match any other digit, despite being reflected, the brain perceives $$$x$$$ as $$$x$$$.

What number will Katya see when she enters the elevator, if it is known that she lives on the $$$k$$$-th floor.

Input

Given an integer $$$k$$$ ($$$1 \le k \le 10^{18}$$$) — the floor where Katya lives.

Output

Output a single number that Katya will see in the mirror, without leading zeros.

Examples
Input
13
Output
31
Input
250
Output
25
Input
1234567890
Output
987624351