a,b=map(int,input().split()) s=0 for i in range(1,int(a**0.5+1)): if not(a/i>a//i): if not(i/b>i//b): s+=1 if not((a//i)/b>(a//i)//b): s+=1 print(s)