Time Limit:20000ms Memory Limit:65536KB

Description

A lucky number is a number whose decimal representation contains only the digits
4 and 7. An almost lucky number is a number that is divisible by a lucky number.
For example, 14, 36 and 747 are almost lucky, but 2 and 17 are not. Note that a
number can be both lucky and almost lucky at the same time (for example, 747).
You are given long longs a and b. Return the number of almost lucky numbers
between a and b, inclusive.

Input

Multiple test cases.
Each test cases is two number a, b in a line seperated by a space.
-a will be between 1 and 10,000,000,000, inclusive.
-b will be between a and 10,000,000,000, inclusive.

Output

For each test case, output the answer in a single line.

Sample Input

1 10
14 14
1 100
1234 4321

Sample Output

3
1
39
1178

Hint


Author

Source

srm453.5