N,k=map(int,input().split()) p=0 for n in range(N): c,i,m=1,2,n while n>=i*i: if m%i<1: c+=1 while m%i<1:m/=i i+=1 if c>k: break c+=m>1 if c>k:p+=1 print(p)