#include <bits/stdc++.h>
using namespace std;
int a[100005] = {0};
int b[100005] = {0};
int c[100005] = {0};
int main() {
  long long r, c;
  cin >> r >> c;
  long long two[31], three[21];
  two[0] = 1;
  for (int i = 1; i < 31; ++i) two[i] = 2 * two[i - 1];
  three[0] = 1;
  for (int i = 1; i < 21; ++i) three[i] = 3 * three[i - 1];
  int sum = 0;
  for (int i = 0; i < 31; ++i) {
    for (int j = 0; j < 21; ++j) {
      long long temp = two[i] * three[j];
      if (temp >= r && temp <= c) sum++;
    }
  }
  cout << sum;
  return 0;
}
