def f(n): global i,lst if i % n == 0: lst.append(n) if n == 1: return return f(n - 1) l,j = map(int,input().split()) sum = 0 for i in range(l,j + 1): lst = [] f(i) if len(lst) == 2: sum += i else: continue print(sum)