Problem7562-- [CSES Problem Set] Counting Numbers

7562: [CSES Problem Set] Counting Numbers

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 256 MiB

Description

Your task is to count the number of integers between $a$ and $b$ where no two adjacent digits are the same.

Input

The only input line has two integers $a$ and $b$.

Output

Print one integer: the answer to the problem.

Constraints

$0≤a≤b≤10^{18}$

Sample 1 Input

123 321

Sample 1 Output

171

HINT

相同题目:CSES 2220

Source/Category