Capracar conversion
The Indian mathematician D. R. Kaprekar is known for his works in number theory. One of his works is devoted to the so-called Capracar transformation. Consider the following operation. Let the number is given. Let is the largest number that can be obtained from by permuting its digits, and is the smallest number (this number can contain leading zeros). Let's designate as the difference , supplemented if necessary with leading zeros so that the number of digits in it is equal to the number of digits in .
For example .
Kaprekar proved that if we start with some four-digit number , in which not all the digits are equal, and successively apply this operation to it (calculate , then sooner or later the number will appear. For this number the equality is true, therefore, the process on it will be cycled.
Your task is to write a program that calculates by the number .
Input
One integer without leading zeroes.
Output
Print .