#include <fstream>

using namespace std;

long long FactorCount(long long a)
{
	long long i = 2;
	long long temp = -1;
	long long TempCount = 0;
	long long count = 1;
	bool first = false;
	while (a > 1)
	{
		if (a % i == 0)
		{
			a /= i;
			if (!first)
			{
				first = true;
				temp = i;
			}
			else
			{
				if (temp == i)
				{
					TempCount++;
				}
			}
		}
		else
		{
			i++;
			count *= (TempCount + 1);
			TempCount = 0;
		}
	}
	return count;
}

int main()
{
	ifstream input("CAU1_17.inp");
	ofstream output("CAU1_17.out");

	int count = 0;
	long long n, k;
	input >> n >> k;
	for (int i = 1; i <= n; i++)
	{
		if (FactorCount(i) == k)
		{
			count++;
		}
	}
	output << count;
	input.close();
	output.close();
	return 0;
}