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