#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m, ans = 0;
  cin >> n >> m;
  for (long long i = 1; i <= m; i *= 2) {
    for (long long j = 1; j <= m; j *= 3) {
      if (i * j >= n && i * j <= m) ans++;
    }
  }
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
