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 print(len([x for x in p if x>=k]))