Small John is testing numbers using two integers, and . For any integer , if A \leq X \leq B, then passes John's test. If not, John rearranges the digits of to form a new integer . He constructs by taking the first digit of , then the last digit, followed by the second digit, the second-to-last digit, and so on, until all digits are used. For instance, if X = 1234567, then Y = 1726354, and if X = 1020, then Y = 1002. If A \leq Y \leq B, then passes the test; otherwise, it does not.
Your task is to determine how many positive integers pass John's test.
Two integers and , separated by a space.
The count of positive integers that pass the test.
\Constraints
1 \leq A \leq B \leq 10^{18}
Example 1
Example 2
In the first example, the numbers , , , , , , and pass John's test.