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