Problem: The Prodiggers are quite a cool band and for this reason, they have been the surprise guest at the ENTER festival for the past 80 years. At the beginning of their careers, they weren’t so successful, so they had to spend time digging channels to earn money; hence the name. Anyway, they like to tour a lot and have surprising amounts of energy to do extremely long tours. However, they hate spending two consecutive days without having a concert, so they would like to avoid it.

A tour is defined by a sequence of concerts and days-off. You need to count in how many ways The Prodiggers can select k different tours of the same length between l and r.

For example if k = 2, l = 1 and r = 2, if we define concert day as {1} and day-off as {0}, here are all possible tours: {0}, {1}, {00}, {01}, {10}, {11}. But tour 00 can not be selected because it has 2 days-off in a row. Now, we need to count in how many ways we can select k = 2 tours of the same length in range [1;2]. Here they are: {0,1}; {01,10}; {01,11}; {10,11}.

Since their schedule is quite busy, they want you to tell them in how many ways can do that, modulo 1 000 000 007 (109 + 7).

Input

The first line of the input contains three integers k, l and r (1 ≤ k ≤ 200, 1 ≤ l ≤ r ≤ 1018).

Output

Output a single number: the number of ways to select k different tours of the same length, modulo 1 000 000 007.

Example

Input

1 1 2


Output

5

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 205;
const int mod = 1e9 + 7;
inline int pls(int a, int b) { return a + b >= mod ? a + b - mod : a + b; }
inline int mns(int a, int b) { return a - b < 0 ? a - b + mod : a - b; }
inline void inc(int& a, int b) {
  if ((a += b) >= mod) a -= mod;
}
inline void dec(int& a, int b) {
  if ((a -= b) < 0) a += mod;
}
inline int fpow(int b, int k) {
  int res = 1;
  while (k) {
    if (k & 1) res = 1LL * res * b % mod;
    b = 1LL * b * b % mod;
    k >>= 1;
  }
  return res;
}
inline int inv(int x) { return fpow(x, mod - 2); }
struct Int {
  int x, y;
  Int() { x = y = 0; }
  Int(int _a, int _b) : x(_a), y(_b) {}
  Int operator+(const Int& rhs) const {
    return Int(pls(x, rhs.x), pls(y, rhs.y));
  }
  Int operator-(const Int& rhs) const {
    return Int(mns(x, rhs.x), mns(y, rhs.y));
  }
  Int operator*(const Int& rhs) const {
    return Int(pls(1LL * x * rhs.x % mod, 5LL * y * rhs.y % mod),
               pls(1LL * x * rhs.y % mod, 1LL * y * rhs.x % mod));
  }
  Int operator*(const int& rhs) const {
    return Int(1LL * x * rhs % mod, 1LL * y * rhs % mod);
  }
  Int operator/(const Int& rhs) const {
    return Int(mns(1LL * x * rhs.x % mod, 5LL * y * rhs.y % mod),
               mns(1LL * y * rhs.x % mod, 1LL * x * rhs.y % mod)) *
           fpow(mns(1LL * rhs.x * rhs.x % mod, 5LL * rhs.y * rhs.y % mod),
                mod - 2);
  }
  Int operator^(long long k) {
    Int res(1, 0), base = *this;
    while (k) {
      if (k & 1) res = res * base;
      base = base * base;
      k >>= 1;
    }
    return res;
  }
} A, B, x, y, tmp, q;
int ans, k, C[N][N], S[N][N], fac = 1;
long long l, r, n;
int main(void) {
  cin >> k >> l >> r;
  l += 2, r += 2;
  for (int i = 0; i <= k; ++i) {
    C[i][0] = 1;
    for (int j = 1; j <= i; ++j) C[i][j] = pls(C[i - 1][j - 1], C[i - 1][j]);
  }
  S[0][0] = 1;
  for (int i = 1; i <= k; ++i) {
    for (int j = 1; j <= i; ++j)
      S[i][j] = mns(S[i - 1][j - 1], 1LL * (i - 1) * S[i - 1][j] % mod);
  }
  A = Int(0, inv(5));
  B = Int(0, mod - inv(5));
  x = Int((mod + 1) / 2, (mod + 1) / 2);
  y = Int((mod + 1) / 2, mod - ((mod + 1) / 2));
  n = (r - l + 1);
  for (int i = 1; i <= k; ++i) {
    tmp = Int(0, 0);
    fac = 1LL * fac * i % mod;
    for (int j = 0; j <= i; ++j) {
      q = (x ^ j) * (y ^ (i - j));
      if (q.x == 1 && q.y == 0) {
        tmp = tmp + (A ^ j) * (B ^ (i - j)) * (n % mod) * C[i][j];
      } else {
        q = (Int(1, 0) - (q ^ n)) / (Int(1, 0) - q);
        tmp = tmp + (A ^ j) * (B ^ (i - j)) *
                        ((((x ^ j) * (y ^ (i - j))) ^ l) * q) * C[i][j];
      }
    }
    inc(ans, 1LL * tmp.x * S[k][i] % mod);
  }
  cout << 1LL * ans * inv(fac) % mod;
  return 0;
}