#coding: utf-8 ##yuki_106 n,k=map(int,raw_input().split()) s=[0 for i in xrange(20000001)] for i in xrange(2,n+1): if s[i]==0: for j in xrange(i,n+1,i): s[j]+=1 res=0 for i in xrange(2,n+1): if s[i]>=k: res+=1 print res