import sys readline = sys.stdin.readline class UF(): def __init__(self, num): self.par = [-1]*num def find(self, x): if self.par[x] < 0: return x else: stack = [] while self.par[x] >= 0: stack.append(x) x = self.par[x] for xi in stack: self.par[xi] = x return x def union(self, x, y): rx = self.find(x) ry = self.find(y) if rx != ry: if self.par[rx] > self.par[ry]: rx, ry = ry, rx self.par[rx] += self.par[ry] self.par[ry] = rx return True return False L, R = map(int, readline().split()) R += 1 Edge = [] for x in range(L, R): for k in range(2, -(-R//x)): Edge.append((0, x-L, x*k-L)) for x in range(L, R-1): Edge.append((1, x-L, x+1-L)) T = UF(R-L) Edge.sort() ans = 0 for c, a, b in Edge: if T.union(a, b): ans += c print(ans)