
import std.stdio;
 
int l,r;

void main()
{
	scanf("%d %d", &l, &r);
    long low = 1;
    int ans = 0;
    while(low<=r){
        long x=low;
        while(x<=r){
            if(x>=l){
                ans++;
            }
            x*=2;
        }
        low*=3;
    }
    printf("%d",ans);
}