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