#include<bits/stdc++.h>
using namespace std;

int main(){
  int a,b;
  int x,y;
  cin>>a>>b;
  for(int i=a;i<=b;i++){
    x=i;
    while(x%2==0) if(x==0)break; x/=2;
    while(x%3==0) if(x==0)break; x/=3;
    while(x%5==0) if(x==0)break; x/=5;
    if(x==0)y++;
  }cout<<y<<endl;
  return 0;
}
