N, K = map(int, raw_input().strip().split()) npf = [0] * (N+1) for i in xrange(2, N+1): if npf[i] == 0: for j in xrange(i, N+1, i): npf[j] += 1 ans = 0 for i in xrange(2, N+1): if npf[i] >= K: ans += 1 print(ans)