#include
#include
using namespace std;
int main(){
int a, b, d = 0;
cin >> a >> b;
for (int x = 1; x <= a; x++)
{
int t,s,m;
s = x;
m = a;//复制a的值
while (t = m % s)
{
m = s;//这里不再修改a的值,不然for循环会出问题
s = t;
}
if (s >= b)
{
d++;
}
}
cout << d << endl;
_getch();
return 0;
}