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.
import bisect
import decimal
from decimal import Decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq 
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate

# sys.setrecursionlimit(200000)
mod = 10**9+7
# mod = 998244353
decimal.getcontext().prec = 46

def primeFactors(n): 
    prime = set()
    while n % 2 == 0: 
        prime.add(2)
        n = n//2
    for i in range(3,int(math.sqrt(n))+1,2): 
        while n % i== 0: 
            prime.add(i)
            n = n//i 
    if n > 2: 
        prime.add(n)
    return list(prime)
    
def getFactors(n) : 
    factors = []
    i = 1
    while i <= math.sqrt(n): 
        if (n % i == 0) : 
            if (n // i == i) : 
                factors.append(i)
            else : 
                factors.append(i)
                factors.append(n//i)
        i = i + 1
    return factors
    
def modefiedSieve(): 
    mx=10**7+1
    sieve=[-1]*mx
    for i in range(2,mx):
        if sieve[i]==-1:
            sieve[i]=i
            for j in range(i*i,mx,i):
                if sieve[j]==-1:
                    sieve[j]=i
    return sieve
    
def SieveOfEratosthenes(n): 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * p, n+1, p): 
                prime[i] = False
        p += 1
    num = []
    for p in range(2, n+1): 
        if prime[p]: 
            num.append(p)
    return num

def lcm(a,b):
    return (a*b)//math.gcd(a,b)

def sort_dict(key_value):
    return sorted(key_value.items(), key = lambda kv:(kv[1], kv[0]), reverse=True)

def list_input():
    return list(map(int,input().split()))
    
def num_input():
    return map(int,input().split())
    
def string_list():
    return list(input())
    
def decimalToBinary(n):  
    return bin(n).replace("0b", "")  
    
def binaryToDecimal(n): 
    return int(n,2) 
    
def DFS(n,s,adj):              
    visited = [False for i in range(n+1)]  
    stack = [] 
    stack.append(s)  
  
    while (len(stack)):  
        s = stack[-1]  
        stack.pop() 
  
        if (not visited[s]):  
            visited[s] = True 
            
        for node in adj[s]:  
            if (not visited[node]):  
                stack.append(node)  
        
def maxSubArraySum(a,size): 
    max_so_far = -sys.maxsize - 1
    max_ending_here = 0
    start = 0
    end = 0
    s = 0
  
    for i in range(0,size): 
        max_ending_here += a[i] 
        if max_so_far < max_ending_here: 
            max_so_far = max_ending_here 
            start = s 
            end = i 
  
        if max_ending_here < 0: 
            max_ending_here = 0
            s = i+1
    
    return max_so_far,start,end
    
def lis(arr): 
    n = len(arr) 
    lis = [1]*n 
    for i in range (1 , n): 
        for j in range(0 , i): 
            if arr[i] >= arr[j] and lis[i]< lis[j] + 1 : 
                lis[i] = lis[j]+1
    maximum = 0
    for i in range(n): 
        maximum = max(maximum , lis[i]) 
  
    return maximum 
        
def solve():
    end_number = [1,4]
    for i in range(2,65):
        a = end_number[i-2]+2
        end_number.append(a+(2**i-1)*2)
    
    l,r = num_input()
    lower = math.floor(math.log(l,2))
    upper = math.floor(math.log(r,2))
    summ = 0
    
    if lower == upper:
        if lower == 0:
            print(1)
            return
        left = end_number[lower]
        a = left - 2*(int(pow(2,lower))-1)
        l -= (int(pow(2,lower))-1)
        a = a+(l-1)*2
        r -= (int(pow(2,lower))-1)
        n = r-l+1
        summ = (n*(a+n-1))%mod
        print(summ)
        return
    
    #bottom sum
    if lower != 0:
        left = end_number[lower]
        #a = left - 2*(2**lower-1)
        a = left - 2*(int(pow(2,lower))-1)
        #l -= (2**lower-1)
        l -= (int(pow(2,lower))-1)
        a = a+(l-1)*2
        #n = 2**lower - l + 1
        n = int(pow(2,lower))-l+1
        summ += (n*(a+n-1))%mod
    else:
        summ += 1
    
    #top sum
    right = end_number[upper]
    #a = right - 2*(2**upper-1)
    a = right - 2*(int(pow(2,upper))-1)
    #r -= (2**upper-1)
    r -= (int(pow(2,upper))-1)
    summ = (r*(a+r-1)+summ)%mod
    
    for i in range(lower+1,upper):
        left = end_number[i]
        #a = left - 2*(2**i-1)
        a = left - 2*(int(pow(2,i))-1)
        #n = 2**i
        n = int(pow(2,i))
        summ = (n*(a+n-1)+summ)%mod
    
    print(summ)
    
t = 1
#t = int(input())
for _ in range(t):
    solve()


    
    
    
    
