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.io.*;
import java.util.*;
import java.math.*;
public class work
{
    public static void main(String[] args) throws IOException
    {
        StringBuilder inner = new StringBuilder();
        // HashMap<Integer, Integer> hm = new HashMap<>();
        // ArrayList<Integer> list = new ArrayList<>();
        Reader s = new Reader();
        //FastReader s = new FastReader();
       
            long n = s.nl();
            long m = s.nl();
            long l = 0;
            long r = 0;
            long arr[] = func (n-1);
            long brr[] = func (m);
            l = (((arr[1]* ((arr[1] + 1)%1000000007) %1000000007)) + (arr[0] * arr[0])%1000000007)%1000000007;
            
            r = (((brr[1]* ((brr[1] + 1)%1000000007) %1000000007)) + (brr[0] * brr[0])%1000000007)%1000000007;
            print(((r - l) + 1000000007)%1000000007);
    }
    static long[] func (long x)
    {
        int turn = 0;
        long arr[] = new long[2];
        while (x > 0)
        {
            if (turn % 2 == 0)
                arr[0] = (arr[0] + Math.min(x, ((long)(Math.pow(2, turn)))))%1000000007;
            else
                arr[1] = (arr[1] + Math.min(x, ((long)(Math.pow(2, turn)))))%1000000007;
            x -= (long)Math.pow(2, turn);
            turn++;
        }
        return arr;
    }
    
    /*

    ********if input in hashmap*********

    for (int i = 0; i < n; i++)
    {
        int x = s.nextInt();
        if (!hm.containsKey(x))
            hm.put(x, 1);
        else
            hm.put(x, hm.get(x) + 1);
    }

     */
 /*

    ********if input in 2darray*********

    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
        {
            arr[i][j] = s.nextInt();
        }
    }

     */
 /*
    
    *********GCD**********

    private static int gcdThing(int a, int b)
    {
        return BigInteger.valueOf(a).gcd(BigInteger.valueOf(b)).intValue();
    }

     */
 /*

    ***********nCr**********

    static int nCr(int n, int k)
    {
        int ans = 1;
        if ( k > n - k )
            k = n - k;
        for (int i = 0; i < k; ++i)
        {
            ans *= (n - i);
            ans /= (i + 1);
        }
        return res;
    }

     */
 /*
    ******Method to check if x is power of 2********
    
    static boolean isPowerOfTwo (int x)
    {
        return x!=0 && ((x&(x-1)) == 0);
    }
     */
 /*
    *******generate all primes*******
    
    void sieveOfEratosthenes(int n)
    {
        // Create a boolean array "prime[0..n]" and initialize
        // all entries it as true. A value in prime[i] will
        // finally be false if i is Not a prime, else true.
        boolean prime[] = new boolean[n+1];
        for(int i=0;i<n;i++)
            prime[i] = true;

        for(int p = 2; p*p <=n; p++)
        {
            // If prime[p] is not changed, then it is a prime
            if(prime[p] == true)
            {
                // Update all multiples of p
                for(int i = p*2; i <= n; i += p)
                    prime[i] = false;
            }
        }

        // Print all prime numbers
        for(int i = 2; i <= n; i++)
        {
            if(prime[i] == true)
                System.out.print(i + " ");
        }
    }

     */

 /*
    *********permutaion program********

    static boolean shouldSwap(StringBuilder str, int start, int curr)
    {
        for (int i = start; i < curr; i++)
        {
            if (str.charAt(i) == str.charAt(curr))
            {
                return false;
            }
        }
        return true;
    }

    static void findPermutations(StringBuilder str, int index, int n, HashSet<Integer> hs)
    {
        if (index >= n)
        {
            int number = Integer.parseInt(str.toString(), 2);
            hs.add(number);
            return;
        }

        for (int i = index; i < n; i++)
        {

            boolean check = shouldSwap(str, index, i);
            if (check)
            {
                char temp = str.charAt(index);
                str.setCharAt(index, str.charAt(i));
                str.setCharAt(i, temp);
                findPermutations(str, index + 1, n, hs);
                temp = str.charAt(index);
                str.setCharAt(index, str.charAt(i));
                str.setCharAt(i, temp);
            }
        }
    }
     */
 /*
    ********** island program********

    public static int findisland(int[][]a,int n,int m)
    {
        int count = 0;
        int [][]visited = new int[n][m];
        for (int i = 0; i < n; i++)
        {
            for (int j = 0; j < m; j++)
            {
                if (visited[i][j] == 0 && a[i][j] == 1)
                {
                    count++;
                    island(a, n, m, i, j, visited);
                }
            }

        }
        return count;
    }
    static void island(int [][]a, int n, int m,int i, int j, int[][] visited)
    {
        if (i >= 0 && i < n && j >= 0 && j < m && visited[i][j] == 0 && a[i][j] == 1)
        {
            visited[i][j] = 1;
            for (int k = -1; k <= 1; k++)
            {
                for (int l = -1; l <= 1; l++)
                {
                    if (i+k >= 0 && i+k < n && j+l >= 0 && j+l < m )
                        island(a, n, m, i+k, j+l, visited);
                }
            }
        }
        else
            return;
    }

     */


    static class pair
    {
        int a,b;
        pair(int x, int y)
        {
            a=x;
            b=y;
        }
    }
    static void println(Object line) 
    {
        System.out.println(line);
    }
    static void print(Object line) 
    {
        System.out.print(line);
    }

    static class Reader
    {

        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                {
                    break;
                }
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int ni() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
            {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg)
            {
                c = read();
            }
            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
            {
                return -ret;
            }
            return ret;
        }

        public long nl() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
            {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg)
            {
                c = read();
            }
            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (neg)
            {
                return -ret;
            }
            return ret;
        }

        public double nd() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
            {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg)
            {
                c = read();
            }

            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
            {
                return -ret;
            }
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
            {
                buffer[0] = -1;
            }
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
            {
                fillBuffer();
            }
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
            {
                return;
            }
            din.close();
        }
    }

    /*recommended*/
    static class FastReader
    {

        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public FastReader(String file_name) throws IOException
        {
            br = new BufferedReader(new FileReader(file_name));
        }
        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int ni()
        {
            return Integer.parseInt(next());
        }

        long nl()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            } catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }

    }
}
