#include <bits/stdc++.h>
using namespace std;
double m, n, c, d, j, k, l, r, x, t, y, u, a, b, z;
vector<long long int> v, w;
set<long long int> s1;
string s, p, q;
map<long long int, pair<long long int, long long int> > mp;
map<char, long long int> mk;
long long int i = 1;
int main() {
  cin >> n >> m;
  for (i = 1; i <= m; i *= 2) {
    for (j = 1; j <= m; j *= 3) {
      if (n <= i * j && m >= i * j) c++;
    }
  }
  cout << c;
}
