l, r = map(int, input().split()) cnt = 0 if l <= 295 < r: cnt += 1 if l <= 416 < r: cnt += 1 print(cnt)