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].
def ways(l, r):
    ans = [0] * 3
    while l % 3 > 0 and l <= r:
        ans[l % 3] += 1
        l += 1
    
    repetitions = max(0, (r - l) // 3)
    for i in range(3):
        ans[i] += repetitions

    for r_copy in range(r - r % 3, r + 1):
        if r_copy >= l:
            ans[r_copy % 3] += 1
    
    return ans

def verify(l, r):
    ans = [0] * 3
    for i in range(l, r + 1):
        ans[i % 3] += 1
    assert ways(l, r) == ans

def verify_ways(iterations):
    import random
    for _ in range(iterations):
        l = random.randint(1, 101)
        r = random.randint(l, 201)
        print("Verifying", l, r)
        verify(l, r)

"""
assert ways(1,1) == [0,1,0]
assert ways(2,2) == [0,0,1]
assert ways(0,0) == [1,0,0]
assert ways(0,2) == [1,1,1]
assert ways(1,3) == [1,1,1]
assert ways(1,4) == [1,2,1]
verify(9, 24)
verify_ways(100)
"""

def solve(n, l, r):
    return solve_internal(n, ways(l, r), 0, {})

def solve_internal(n, ways, goal, memo):
    table = ways[:]
    for _ in range(2, n + 1):
        table_prev = table[:]
        for j in range(3):
            table[j] = (ways[0] * table_prev[j] + ways[1] * table_prev[(j - 1) % 3] + ways[2] * table_prev[(j - 2) % 3]) % (10 ** 9 + 7) 

    return table[0] % (10 ** 9 + 7)

n, l, r = map(int, input().split())
print(solve(n, l, r))