L, R = map(int, input().split()) class UnionFind: def __init__(self, n=1): self.parent = [i for i in range(n)] self.rank = [0] * n def find(self, x): if self.parent[x] == x: return x else: self.parent[x] = self.find(self.parent[x]) return self.parent[x] def union(self, x, y): x = self.find(x) y = self.find(y) if x != y: if self.rank[x] < self.rank[y]: x, y = y, x if self.rank[x] == self.rank[y]: self.rank[x] += 1 self.parent[y] = x def is_same(self, x, y): return self.find(x) == self.find(y) uf = UnionFind(R-L+1) for i in range(L, R): for j in range(i, R+1, i): uf.union(i-L, j-L) print(len(set([uf.find(i) for i in range(R-L+1)]))-1)