N,K = map(int,raw_input().split()) fn = [0]*(N+1) for i in xrange(2,N+1): if fn[i] == 0: for j in xrange(i,N+1,i): fn[j] += 1 print len(filter(lambda x:x>=K,fn))