Nazar, a student of the scientific lyceum of the Kingdom of Kremland, is known for his outstanding mathematical abilities. Today a math teacher gave him a very difficult task.

Consider two infinite sets of numbers. The first set consists of odd positive numbers (1, 3, 5, 7, …), and the second set consists of even positive numbers (2, 4, 6, 8, …). At the first stage, the teacher writes the first number on the endless blackboard from the first set, in the second stage — the first two numbers from the second set, on the third stage — the next four numbers from the first set, on the fourth — the next eight numbers from the second set and so on. In other words, at each stage, starting from the second, he writes out two times more numbers than at the previous one, and also changes the set from which these numbers are written out to another. 

The ten first written numbers: 1, 2, 4, 3, 5, 7, 9, 6, 8, 10. Let's number the numbers written, starting with one.

The task is to find the sum of numbers with numbers from l to r for given integers l and r. The answer may be big, so you need to find the remainder of the division by 1000000007 (10^9+7).

Nazar thought about this problem for a long time, but didn't come up with a solution. Help him solve this problem.

Input

The first line contains two integers l and r (1 ≤ l ≤ r ≤ 10^{18}) — the range in which you need to find the sum.

Output

Print a single integer — the answer modulo 1000000007 (10^9+7).

Examples

Input


1 3


Output


7

Input


5 14


Output


105

Input


88005553535 99999999999


Output


761141116

Note

In the first example, the answer is the sum of the first three numbers written out (1 + 2 + 4 = 7).

In the second example, the numbers with numbers from 5 to 14: 5, 7, 9, 6, 8, 10, 12, 14, 16, 18. Their sum is 105.
#include <bits/stdc++.h>
using namespace std;
long long int MOD = 1e9 + 7;
long long int INF = 1e18;
long long int sub(long long int a, long long int b, long long int p = MOD) {
  return ((a % p) - (b % p) + p) % p;
}
long long int mult(long long int a, long long int b, long long int p = MOD) {
  return ((a % p) * (b % p)) % p;
}
long long int add(long long int a, long long int b, long long int p = MOD) {
  return (a % p + b % p) % p;
}
long long int fpow(long long int n, long long int k, long long int p = MOD) {
  long long int r = 1;
  while (k > 0) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
    k = k >> 1;
  }
  return r;
}
long long int inv(long long int a, long long int p = MOD) {
  return fpow(a, p - 2, p);
}
long long int fdiv(long long int a, long long int b, long long int p = MOD) {
  long long int yinv = inv(b);
  long long int ans = (a * yinv) % p;
  return ans;
}
unsigned long long int I1018 = 1000000000000000000;
const unsigned long long int I10e5 = 100000;
const long long int I10e6 = 1e6;
void printVecpll(std::vector<pair<long long int, long long int>> v) {
  for (auto p : v) {
    cout << p.first << " " << p.second << endl;
  }
}
template <typename T>
istream &operator>>(istream &in, vector<T> &a) {
  for (auto &item : a) {
    in >> item;
  }
  return in;
}
template <typename T, typename U>
ostream &operator<<(ostream &out, pair<T, U> &a) {
  cout << a.first << " " << a.second;
  return out;
}
template <typename T, typename U>
ostream &operator<<(ostream &out, map<T, U> &a) {
  for (auto &item : a) {
    out << item << endl;
  }
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, vector<T> &a) {
  for (auto &item : a) {
    out << item << " ";
  }
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, vector<vector<T>> &a) {
  for (auto &item : a) {
    out << item << "\n";
  }
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, set<T> &a) {
  for (auto &item : a) {
    out << item << " ";
  }
  return out;
}
std::vector<bool> is_prime;
std::vector<long long int> primes;
void sieve(long long int n) {
  is_prime.resize(n + 2, true);
  primes.clear();
  long long int p;
  for (p = 2; p * p <= n; p++) {
    if (is_prime[p]) {
      long long int i;
      for (i = p * p; i <= n; i += p) {
        is_prime[i] = false;
      }
    }
  }
  is_prime[0] = is_prime[1] = false;
  long long int i;
  for (i = 2; i <= n; i++) {
    if (is_prime[i]) {
      primes.emplace_back(i);
    }
  }
}
set<long long int> prime_factor(long long int n) {
  sieve(n);
  long long int i;
  set<long long int> s;
  for (auto p : primes) {
    if (p > sqrt(n)) break;
    while (n % p == 0 && n > 1) {
      s.insert(p);
      n /= p;
    }
  }
  if (n > 1) {
    s.insert(n);
  }
  return s;
}
std::vector<long long int> fact_vec;
void fact_fun(long long int n) {
  fact_vec.resize(n + 10);
  long long int i;
  fact_vec[0] = 1;
  for (i = 1; i <= n + 2; i++) {
    fact_vec[i] = (fact_vec[i - 1] * i) % MOD;
  }
}
long long int npr(long long int n, long long int r) {
  long long int ans = fact_vec[n];
  ans /= fact_vec[n - r];
  return ans;
}
long long int ncr(long long int n, long long int r) {
  long long int ans = fact_vec[n];
  ans /= fact_vec[n - r];
  ans /= fact_vec[r];
  return ans;
}
class Sol {
 public:
  Sol() {}
};
long long int sum(long long int a, long long int n) {
  long long int temp;
  long long int t2 = mult(a, 2);
  t2 = add(t2, mult(sub(n, 1), 2));
  temp = mult(n, t2);
  temp = fdiv(temp, 2);
  return temp;
}
long long int solve(long long int r) {
  long long int i = 0;
  if (r == 0) return 0;
  long long int ao = 1, ae = 2;
  long long int ans = 0;
  long long int curr = 0;
  while (true) {
    long long int p = pow(2ll, i);
    if (curr + p > r) {
      long long int req = r - curr;
      if (i % 2 == 0) {
        ans = add(ans, sum(ao, req));
        ao = add(ao, mult(sub(p + 1, 1), 2));
      } else {
        ans = add(ans, sum(ae, req));
        ae = add(ae, mult(sub(p + 1, 1), 2));
      }
      return ans;
      break;
    }
    if (i % 2 == 0) {
      ans = add(ans, sum(ao, p));
      ao = add(ao, mult(sub(p + 1, 1), 2));
    } else {
      ans = add(ans, sum(ae, p));
      ae = add(ae, mult(sub(p + 1, 1), 2));
    }
    curr += p;
    i++;
  }
}
int main() {
  long long int i, j;
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long int l, r;
  cin >> l >> r;
  long long int a1 = solve(l - 1);
  long long int a2 = solve(r);
  long long int ans = sub(a2, a1);
  cout << ans << endl;
  return 0;
}
