n, k = map(int, raw_input().split()) num = [0] * (n + 1) isprime = [True] * (n + 1) for i in xrange(2, n + 1): if isprime[i]: for j in xrange(i, n + 1, i): isprime[j] = False num[j] += 1 print sum(1 for x in num if x >= k)