import sys def input(): return sys.stdin.readline().rstrip() def main(): N, K = map(int, input().split()) sieve = [None]*(N+1) for i in range(2, N+1): if sieve[i] is None: sieve[i] = i for j in range(2*i, N+1, i): sieve[j] = i ans = 0 for i in range(2, N+1): c = p = 0 while i != 1: if p != sieve[i]: c += 1 p = sieve[i] i //= p if c >= K: ans += 1 print(ans) if __name__ == '__main__': main()