Given a nonnegative integer n. From all its digits create the biggest and then the smallest number. Print the sum of the obtained numbers.
For example, for n = 56002 the biggest will be 65200 and the smallest will be 256 (the leading zeros in the number 00256 do not count). The resulting sum is 65200 + 256 = 65456.
One integers n (0 ≤ n ≤ 10^8
).
Print the sum of the biggest and the smallest numbers, that can be gotten from n by permutation of its digits.