a,b=map(int,input().split()) count1=0 for i in range(a,b+1): sum1=0 for j in range(len(str(i))): sum1+=int(str(i)[j]) if sum1%5==0: count1+=1 else: continue print(count1)