1176: Disgusting numbers

Memory Limit:128 MB Time Limit:1.000 S Judge Style:Text Compare Creator:
Submit:77 Solved:15

Description

Changsha people call the foolish person 62, and there is no such custom in the Duan`s family here. Compared to 62, the people there dislike the number 38 even more, and of course, there is also the number 4! So, Duan doesn't even want to see numbers end with 38 or 4. Can you find all the annoying numbers every time you give a range [n, m]?

不允许普通用户打印题目,请教师登录后使用。如有疑问请联系管理员!

Input

Multiple sets of input and output;

All inputs are integers for n and m. If n and m are both 0, the input ends.


0<n,m<=1000000
There are no more than 10000 sets of data


Output

For each input

Output the number of all annoying numbers in one line



Sample Input Copy

1 100
0 0

Sample Output Copy

11