#include<iostream>
using namespace std;
int main(){
	int l, r;
	while (cin >> l >> r){
		int ans = 0;
		for (int i = l; i <= r; i++){
			int q = i;
			while (q % 2 == 0)q /= 2;
			while (q % 3 == 0)q /= 3;
			while (q % 5 == 0)q /= 5;
			if (q == 1)ans++;
		}
		cout << ans << endl;
	}
}