L,R=map(int,input().split()) cnt=0 if 1<=L<=295: cnt+=1 elif 295<=L<=416: cnt+=1 elif 417<=R<=420: cnt+=1 print(cnt-1)