#include <fstream>
using namespace std;
ifstream f1("baii1.inp");
ofstream f2("baii1.out");
long demuoc(long i)
{
    long tg = 2;
    for (long j = 2; j <= i/2; j++)
    {
        if (i%j == 0) tg++;
    }
    return tg;
}
long n,k,dem = 0;
int main()
{
    f1 >> n >> k;
    for (long i = k; i < n; i++)
    {
        if (demuoc(i) == k) dem++;
    }
    f2 << dem;
    return 0;
}
