n, k = map(int, input().split()) p = [0 for i in range(n+1)] for i in range(2, n+1): if p[i]>0: continue j = i*2 while j<=n: p[j] += 1 j+=i p[i] = 1 c = 0 for i in p: if i>=k: c+=1 print(c)