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