Exchange of digits#7376

Exchange of digits

1 second
64 megabytes
Hard

What is the largest number you can obtain by swapping two digits of a given integer ?

Input

One integer n~(|n| \le 10^{15}).

Output

Print the required maximum number.

Examples

Example 1

Loading
Loading