L, R = map(int, input().split()) def category(x: int) -> int: return 1 if x <= 295 else 2 if x <= 416 else 3 print(category(R) - category(L))