def f(a,b): count = 0 for i in range(a,b + 1): num = 0 for j in str(i): num += int(j) if num % 5 == 0: count += 1 return count s = input() lst = s.split(' ') a = int(lst[0]) b = int(lst[1]) print(f(a,b))