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