Different Digits#6598

Different Digits

1 second
64 megabytes
Very easy

The inhabitants of Nlogonia are very superstitious. One of their beliefs is that street house numbers that have a repeated digit bring bad luck for the residents. Therefore, they would never live in a house which has a street number like or .

The Queen of Nlogonia ordered a new seaside avenue to be built, and wants to assign to the new houses only numbers without repeated digits, to avoid discomfort among her subjects. You have been appointed by Her Majesty to write a program that, given two integers and , determines the maximum number of houses that can be assigned street numbers between and , inclusive, that do not have repeated digits.

Input

Each test case is described using one line. The line contains two integers and , as described above (1 \le N \le M \le 5000).

Output

For each test case output a line with an integer representing the number of street house numbers between and , inclusive, with no repeated digits.

Examples

Example 1

Loading
Loading