#include<iostream>
using namespace std;

int main(void){
	int m,n,ans;
	while(cin>>m,m){
		cin>>n;
		ans = 0;
		for(int i = 1; i <= n ; i *= 5)
		for(int j = i; j <= n ; j *= 3)
		for(int k = j; k <= n ; k *= 2){
			if(k>=m)
				ans ++;
		}
		cout<<ans<<endl;
	}
	return 0;
}