l,r=map(int, input().split()) ans=0 if l<=295 and r>=296: ans+=1 if r>=417: ans+=1 elif l<=416 and r>=417: ans+=1 print(ans)