n,m=map(int,input().split()) q=[0]*(n+m+2)+[0] for i in range(2,m+1): for j in range(0,n+1,i): q[j+1]+=1 q[j+i]-=1 q[j+i]+=-(i-1) q[j+i+1]-=-(i-1) for i in range(n+1): q[i]+=q[i-1] for i in range(n+1): q[i]+=q[i-1] print(max(q[:n+1]))