#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long a, b;
  cin >> a >> b;
  long long c = 0;
  for (long long i = 1; i <= b; i *= 2) {
    for (long long j = 1; j <= b; j *= 3) {
      if (i * j >= a && i * j <= b) c++;
    }
  }
  cout << c;
}
int main() {
  int t = 1;
  while (t--) {
    solve();
    cout << endl;
  }
  return 0;
}
