N, K = map(int, input().split()) P = list(range(N+1)) for i in range(2,N+1): if i*i>N:break for j in range(i*i,N+1,i): P[j] = P[i] ans = 0 for i in range(2,N+1): A = set() j = i while j>1: A.add(P[j]) j = j//P[j] if len(A)>=K: ans += 1 print(ans)