# 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 $x$ is given. Let $M$ is the largest number that can be obtained from $x$ by permuting its digits, and $m$ is the smallest number (this number can contain leading zeros). Let's designate as $K(x)$ the difference $Mâˆ’m$, supplemented if necessary with leading zeros so that the number of digits in it is equal to the number of digits in $x$.

For example $K(100)=100âˆ’001=099,K(2414)=4421âˆ’1244=3177$.

Kaprekar proved that if we start with some four-digit number $x$, in which not all the digits are equal, and successively apply this operation to it (calculate $K(x),K(K(x)),...)$, then sooner or later the number $6174$ will appear. For this number the equality $K(6174)=7641âˆ’1467=6174$ is true, therefore, the process on it will be cycled.

Your task is to write a program that calculates $K(x)$ by the number $x$.

## Input

One integer $xÂ(1â‰¤xâ‰¤10_{9})$ without leading zeroes.

## Output

Print $K(x)$.