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