N,M=map(int,input().split()) dp=[0]*(N+1) divs = [[1] for i in range(2*10**5+1)] for i in range(2,2*10**5+1): for j in range(2*i,2*10**5+1,i): divs[j].append(i) ans=0;c=0 for i in range(1,N+1): if i==1: c+=M-1 else: p=len(divs[i])+1 c+=M-sum(divs[i])-i ans=max(ans,c) print(ans)