import sys input = lambda : sys.stdin.readline().rstrip() sys.setrecursionlimit(2*10**5+10) write = lambda x: sys.stdout.write(x+"\n") debug = lambda x: sys.stderr.write(x+"\n") writef = lambda x: print("{:.12f}".format(x)) def isqrt(n): """x*x<=nなる最大のx """ x,y = n, (n+1)//2 while y1 and l<=i*kk<=r: while i*kk-l>=0: ok[i*kk-l] = 0 i -= 1 for v in range(l, r+1): vv = isqrt(v) if vv*vv==v: ok[v-l] = 0 ans = sum(ok) print(ans)