#include <fstream>
#include <algorithm>

using namespace std;

#define maxN 100000

ifstream input("Bai1_18.inp");
ofstream output("Bai1_18.out");
int n, k;
int sa[maxN + 1];
int res = 0;

int main()
{
	input >> n >> k;
	fill(sa, sa + n + 1, 2);
	if (k == 1)
	{
		res = 1;
	}
	else
	{
		for (int i = 2; i <= n; ++i)
		{
			if (sa[i] == k)
			{
				++res;
			}
			for (int j = 2; i * j <= n; ++j)
			{
				++sa[i * j];
			}
		}
	}
	output << res;
	input.close();
	output.close();
	return 0;
}