a, b = map(int, input().split()) g = 0 for i in range(a,b+1): i = str(i) s = 0 for j in i: s = s + int(j) if s % 5 == 0: g = g + 1 print(g)