#include<cctype>
#include<cmath>
#include<cstdio> 
#include<cstring> 
#include<iomanip>          //设置输出格式 
#include<iostream>
#include<algorithm>

using namespace std;

int main()
{
	long long x, y;
	cin >> x >> y;
	long long A = 0, a = x, b = x;
	for( long long i=x; i<=y; i++){
		b = i;
		if( b%a==0 ){
			A++;
			a = b;
			i += b;
			i--;
		}
	}
	
	cout << A << endl;
	
	return 0;
}