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;
int main() {
  int e = 1000000007;
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long l, r, ll = 0, lr = 0, l1, r1, sr1 = 0, sr2 = 0, sl1 = 0, sl2 = 0,
                  pw1, pw2;
  cin >> l >> r;
  l1 = l - 1;
  l--;
  r1 = r;
  while (l1 > 0) {
    ll++;
    l1 = l1 / 2;
  }
  while (r1 > 0) {
    lr++;
    r1 = r1 / 2;
  }
  long long kll1 = 0, kll2 = 0;
  for (int i = 0; i < ll - 1; i++) {
    if (i % 2 == 0) kll1 += pow(2, i);
    if (i % 2 == 1) kll2 += pow(2, i);
  }
  int u = ll;
  long long m = max(0, u - 1);
  pw1 = pow(2, m);
  if (ll % 2 == 1) kll1 += l + 1 - pw1;
  if (ll % 2 == 0) kll2 += l + 1 - pw1;
  long long klr1 = 0, klr2 = 0;
  for (int i = 0; i < lr - 1; i++) {
    if (i % 2 == 0) klr1 += pow(2, i);
    if (i % 2 == 1) klr2 += pow(2, i);
  }
  pw2 = pow(2, lr - 1);
  if (lr % 2 == 1) klr1 += r + 1 - pw2;
  if (lr % 2 == 0) klr2 += r + 1 - pw2;
  long long s1, s2;
  s1 = (((kll2 % e) * (kll2 % e + 1)) % e + ((kll1 % e) * (kll1 % e)) % e) % e;
  s2 = (((klr2 % e) * (klr2 % e + 1)) % e + ((klr1 % e) * (klr1 % e)) % e) % e;
  cout << (s2 - s1 + e) % e;
}
