#Q167. 「一本通 5.3 例 3」Windy 数

「一本通 5.3 例 3」Windy 数

Description

Original source: SCOI 2009

Windy has defined a type of number called a Windy number: a positive integer without leading zeros and where the absolute difference between every pair of adjacent digits is at least 22.

Windy wants to know how many Windy numbers exist between AA and BB, inclusive.

Input Format

One line containing two numbers, AA and BB.

Output Format

Output a single integer representing the answer.

Sample 1

1 10

9

Sample 2

25 50

20

Data Range and Hints

20%20\% of the data satisfies 1AB1061\le A\le B\le 10^6;
100%100\% of the data satisfies 1AB2×1091\le A\le B\le 2\times 10^9.