from math import ceil, floor, sqrt l,r = map(int, input().split()) start = ceil(sqrt(l)) end = floor(sqrt(r)) print(end - start + 1)