Ayoub had an array a of integers of size n and this array had two interesting properties: 

  * All the integers in the array were between l and r (inclusive). 
  * The sum of all the elements was divisible by 3. 



Unfortunately, Ayoub has lost his array, but he remembers the size of the array n and the numbers l and r, so he asked you to find the number of ways to restore the array. 

Since the answer could be very large, print it modulo 10^9 + 7 (i.e. the remainder when dividing by 10^9 + 7). In case there are no satisfying arrays (Ayoub has a wrong memory), print 0.

Input

The first and only line contains three integers n, l and r (1 ≤ n ≤ 2 ⋅ 10^5 , 1 ≤ l ≤ r ≤ 10^9) — the size of the lost array and the range of numbers in the array.

Output

Print the remainder when dividing by 10^9 + 7 the number of ways to restore the array.

Examples

Input


2 1 3


Output


3


Input


3 2 2


Output


1


Input


9 9 99


Output


711426616

Note

In the first example, the possible arrays are : [1,2], [2,1], [3, 3].

In the second example, the only possible array is [2, 2, 2].
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) {
        sc.init();
        int n = sc.nextInt();
        int l = sc.nextInt();
        int r = sc.nextInt();

        int[] arr = new int[3];

        int a = l % 3;
        int b = (r - l + 1) / 3;
        int c = (r - l + 1) % 3;

        arr[0] = arr[1] = arr[2] = b;
        for (int i = 0; i < c; i++) {
            arr[a]++;
            a = (a + 1) % 3;
        }

        long[] rArr = new long[3];
        rArr[0] = arr[0];
        rArr[1] = arr[1];
        rArr[2] = arr[2];
        long x,y,z= 0;
        for (int i = 1; i < n; i++) {
            x = rArr[0];
            y = rArr[1];
            z = rArr[2];
            rArr[0] = mod(mod(x * arr[0]) + mod(y * arr[2]) + mod(z * arr[1]));
            rArr[1] = mod(mod(x * arr[1]) + mod(y * arr[0]) + mod(z * arr[2]));
            rArr[2] = mod(mod(x * arr[2]) + mod(y * arr[1]) + mod(z * arr[0]));
        }

        System.out.println(rArr[0]);
            


    }

    private static long mod(long i) {
        return i % (1000_000_000 + 7);
    }

    static class sc {
        private static BufferedReader br;
        private static StringTokenizer st;

        static void init() {
            br = new BufferedReader(new InputStreamReader(System.in));
            st = new StringTokenizer("");
        }

        static String readLine() {
            try {
                return br.readLine();
            } catch (IOException e) {
            }
            return null;
        }

        static String readLineReplace() {
            try {
                return br.readLine().replaceAll("\\s+", "");
            } catch (IOException e) {
            }
            return null;
        }

        static String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                }
            }
            return st.nextToken();
        }

        static long nextLong() {
            return Long.parseLong(next());
        }

        static int nextInt() {
            return Integer.parseInt(next());
        }

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