import sys input = sys.stdin.readline N,M=map(int,input().split()) def calc(x): ANS=x*M ind=1 while ind<=M: k=x//ind if k==0: break MAX=x//k # [ind,MAX] MAX=min(MAX,M) ANS-=(ind+MAX)*(MAX-ind+1)*k//2 ind=MAX+1 return ANS ANS=0 for i in range(N+1): ANS=max(ANS,calc(i)) print(ANS)