Difference of numbers#11011

Difference of numbers

1 second
64 megabytes
Very easy

Given four digits, your task is to form the largest and smallest possible numbers using these digits, and then calculate the difference between them.

Input

You will receive four lines of input, each containing a single digit.

Output

Output the difference between the largest and smallest numbers that can be created using the provided digits.

Examples

Example 1

Loading
Loading