太简单了,解法随意

l,r = map(int,input().split())
sum2 = 0
for i in range(l,r+1):
    str1=''
    str1+=str(i) 
    sum1 = 0
    for j in str1:
        sum1+=int(j)
    if sum1%5 ==0:
        sum2+=1
print(sum2)