L,R=map(int,input().split()) if L<=295: L=1 elif 296<=L<=416: L=2 else: L=3 if R<=295: R=1 elif 296<=R<=416: R=2 else: R=3 print(R-L)