mod = 1000000007 eps = 10**-9 def main(): import sys input = sys.stdin.readline L, R = map(int, input().split()) if L == 1: print(0) exit() ans = [1] * (R+1) for d in range(L, R+1): for j in range(2, R+1): if d*j > R: break ans[d*j] = 0 ret = 0 for i in range(L, R+1): if ans[i]: ret += 1 print(ret) if __name__ == '__main__': main()