#include <iostream>
using namespace std;
int main( void )
{
	int n, m;
	while ( cin >> m >> n )
	{
		int answer = 0;
		for ( int i = m; i <= n; i++ )
		{
			int h = i;
			while ( h % 2 == 0 ) h /= 2;
			while ( h % 3 == 0 ) h /= 3;
			while ( h % 5 == 0 ) h /= 5;
			if ( h == 1 ) answer++;
		}
		cout << answer << endl;
	}
	return 0;
}