L,R=map(int,input().split()) ANS=0 if L<=295 and R>=296: ANS+=1 if L<=416 and R>=417: ANS+=1 print(ANS)