In our time, economic indicators play an important role in the life of every person. Suppose two prices are given: the actual (real) price and the expected (forecasted) price. Usually, the real price exceeds the forecasted price, but if it is less, the inflation rate is considered negative.
A critical level of inflation is defined as the greatest possible difference obtained by taking a cyclic permutation of the digits of the first number and a cyclic permutation of the digits of the second number. Leading zeros are not allowed in the representation of any number. Find this greatest difference.
The first line contains the number (the real price), and the second line contains the number (the forecasted price). Each number contains at most digits.
Output one integer — the greatest possible critical level of inflation.
Example 1