N=int(input()) K=int(input()) x=K import math xr=math.ceil(math.sqrt(x)) LIST=[] for i in range(1,xr+1): if x%i==0: LIST.append(i) LIST.append(x//i) LIST=sorted(set(LIST)) ANS=0 for l in LIST: ANS+=max(0,(l-1-max(l-1-N,0)*2)*(K//l-1-max(K//l-1-N,0)*2)) print(ANS)