#include <bits/stdc++.h>
using namespace std;
ifstream fi("BAI1_18.inp");
ofstream fo("BAI1_18.out");
int n,k;
int u;
int d=0;
int main()
{
	fi>>n>>k;
	for(int i=2;i<=n;i++)
	{
		u=1;
		for(int j=2;j*j<=i;j++)
		{
			if(i%j==0) u++;
		}
		if(sqrt(i)==int(sqrt(i))) u=2*u-1;
		else u=u*2;
		if(u==k) d++;
	}
	if((k==1)&&(n>1)) 
	fo<<"1";
	else 
	fo<<d;
	fi.close();
	fo.close();
}
	
	
