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 java.util.*;
import java.io.*;

public class File {

	public static class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		
		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		
		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				}
				catch (IOException e) {
					e.printStackTrace();
				}
			}
			
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		
		long nextLong() {
			return Long.parseLong(next());
		}
	}	
	
	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
		
		
		
		long mod = 1000000007;
		long l = sc.nextLong();
		long r = sc.nextLong();
		
		// Given some number j return the number of odds up to that index.
		long preOdds = oddCount(l-1);
		long preEvens = evenCount(l-1);
		
		long totalPreOdd = pow(preOdds, 2, mod);
		long totalPreEven = (pow(preEvens, 2, mod) + preEvens) % mod;
		
		long totalPre = (totalPreOdd + totalPreEven) % mod;
		
		
		long postOdds = oddCount(r);
		long postEvens = evenCount(r);
		
		long totalPostOdd = pow(postOdds, 2, mod);
		long totalPostEven = (pow(postEvens, 2, mod) + postEvens) % mod;
		
		long totalPos = (totalPostOdd + totalPostEven) % mod;
		
		long oddTotal = ((totalPostOdd + mod) - totalPreOdd) % mod;
		long evenTotal = ((totalPostEven + mod) - totalPreEven) % mod;
		
		long result = (oddTotal + evenTotal) % mod;
		
		out.println(result);
		
		out.close();
	}
	
	public static long pow(long x, long n, long mod) {
		if (n == 0L) {
			return 1L;
		}
		if (n == 1) {
			return x % mod;
		}
		
		long half = pow(x, n / 2, mod) % mod;
		
		if (n % 2 == 0) {
			return (half * half) % mod;
		}
		else {
			return (((half * half) % mod) * x) % mod;
		}
	}
	
	// Given some index (1-indexed) return number of odds up to and including that index.
	public static long oddCount(long index) {
		// (1), 2, (4), 8, (16), 32, (64), ...
		long count = 0;
		long odds = 0;
		
		long currAdd = 1;
		
		boolean odd = true;
		
		while (currAdd <= index) {
			if (odd) {
				long rem = Math.min(index, currAdd);
				odds += rem;
				index -= rem;
				
				currAdd *= 2;
				odd = false;
			}
			else {
				long rem = Math.min(index, currAdd);
				index -= rem;
				
				currAdd *= 2;
				odd = true;
			}
		}
		
		if (index > 0) {
			if (odd) {
				long rem = Math.min(index, currAdd);
				odds += rem;
				index -= rem;
			}
			else {
				long rem = Math.min(index, currAdd);
				index -= rem;
			}
		}
		
		return odds;
	}
	
	// Given some index (1-indexed) return number of evens up to and including that index.
	public static long evenCount(long index) {
		// 1, (2), 4, (8), 16, (32), 64, ...
		long count = 0;
		long evens = 0;
		
		long currAdd = 1;
		
		boolean odd = true;
		
		while (currAdd <= index) {
			if (odd) {
				long rem = Math.min(index, currAdd);
				
				index -= rem;
				currAdd *= 2;
				odd = false;							
			}
			else {
				long rem = Math.min(index, currAdd);
				evens += rem;
				
				index -= rem;
				currAdd *= 2;
				odd = true;
			}
		}
		
		if (index > 0) {
			if (odd) {
				long rem = Math.min(index, currAdd);
				index -= rem;
			}
			else {
				long rem = Math.min(index, currAdd);
				evens += rem;
				index -= rem;
			}
		}
		
		return evens;
	}
}