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 long long MOD = 1e9 + 7;
const int N = 201;
vector<long long> binom(N* N);
vector<long long> factorial(N);
void compute_binom() {
  binom[0] = 1;
  for (int m = 1; m < N; m++) {
    binom[m * N] = 1;
    for (int n = 1; n < N; n++) {
      binom[m * N + n] =
          (binom[(m - 1) * N + n] + binom[(m - 1) * N + n - 1]) % MOD;
    }
  }
}
void compute_factorial() {
  factorial[0] = 1;
  for (int n = 1; n < N; n++) factorial[n] = (n * factorial[n - 1]) % MOD;
}
long long divmod(long long a, long long b) {
  a = ((a % MOD) + MOD) % MOD;
  b = ((b % MOD) + MOD) % MOD;
  long long x_last = 1, y_last = 0, s_last = MOD;
  long long x = 0, y = 1, s = b;
  long long x_next, y_next, s_next, flr;
  while (s != 1) {
    flr = s_last / s;
    x_next = x_last - flr * x;
    y_next = y_last - flr * y;
    s_next = s_last - flr * s;
    x_last = x;
    y_last = y;
    s_last = s;
    x = x_next;
    y = y_next;
    s = s_next;
  }
  return ((a * y) % MOD + MOD) % MOD;
}
struct ModMat2D {
  union {
    long long arr[4];
    struct {
      long long a, b, c, d;
    } x;
  };
  ModMat2D(long long a, long long b, long long c, long long d) {
    x.a = a;
    x.b = b;
    x.c = c;
    x.d = d;
  }
  void print() {
    cout << '|' << x.a << ' ' << x.b << "|\n";
    cout << '|' << x.c << ' ' << x.d << "|\n";
  }
  void operator+=(const ModMat2D& rhs) {
    for (int i = 0; i < 4; i++) arr[i] = (arr[i] + rhs.arr[i]) % MOD;
  }
  void operator*=(const ModMat2D& rhs) {
    long long ans[4];
    memset(ans, 0, sizeof ans);
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2; j++) {
        for (int k = 0; k < 2; k++) {
          ans[2 * i + j] =
              (ans[2 * i + j] + arr[2 * i + k] * rhs.arr[2 * k + j]) % MOD;
        }
      }
    }
    for (int i = 0; i < 4; i++) arr[i] = ans[i];
  }
  void operator*=(const long long& scalar) {
    for (int i = 0; i < 4; i++) arr[i] = (scalar * arr[i]) % MOD;
  }
  void sqr() {
    long long a = x.a, b = x.b, c = x.c, d = x.d;
    x.a = (a * a + b * c) % MOD;
    x.b = (a * b + b * d) % MOD;
    x.c = (c * a + d * b) % MOD;
    x.d = (c * b + d * d) % MOD;
  }
  void inv() {
    long long a = x.a, b = x.b, c = x.c, d = x.d;
    long long detinv = divmod(1, (a * d - b * c));
    x.a = (detinv * d) % MOD;
    x.b = (detinv * (-c)) % MOD;
    x.c = (detinv * (-b)) % MOD;
    x.d = (detinv * a) % MOD;
  }
};
const ModMat2D Phi(0, 1, 1, 1);
const ModMat2D Rt5(-1, 2, 2, 1);
void mpow(ModMat2D& m, long long p) {
  if (p == 0)
    m = ModMat2D(1, 0, 0, 1);
  else if (p == 1)
    return;
  else if (p < 0) {
    m.inv();
    mpow(m, -p);
  } else {
    ModMat2D old = m;
    mpow(m, p / 2);
    m.sqr();
    if (p % 2) m *= old;
  }
}
long long fib_pow_sum(long long l, long long r, long long p) {
  long long ans = 0;
  ModMat2D Ap = Rt5;
  mpow(Ap, -p);
  for (int j = 0; j < p + 1; j++) {
    long long cj = binom[N * p + j];
    ModMat2D Pj = Phi;
    mpow(Pj, 2 * j - p);
    if ((p - j) % 2) {
      cj = -cj;
      Pj *= -1;
    }
    if (p == 2 * j) {
      long long term;
      if (Pj.x.a == -1) {
        if (l % 2) {
          term = -(r % 2);
        } else {
          term = (r + 1) % 2;
        }
      } else {
        term = ((r - l + 1) % MOD);
      }
      term = (cj * term) % MOD;
      term = (Ap.x.a * term) % MOD;
      ans = (ans + term) % MOD;
    } else {
      ModMat2D Pl = Pj;
      ModMat2D Pr = Pj;
      mpow(Pl, l);
      Pl *= -1;
      mpow(Pr, r + 1);
      Pr += Pl;
      ModMat2D Den = Pj;
      Den += ModMat2D(-1, 0, 0, -1);
      Den.inv();
      Pr *= Den;
      Pr *= Ap;
      ans = (ans + cj * Pr.x.a) % MOD;
    }
  }
  return (ans + MOD) % MOD;
}
int main() {
  compute_binom();
  compute_factorial();
  int k;
  long long l, r;
  cin >> k >> l >> r;
  vector<long long> a(k + 1, 0);
  a[0] = 1;
  for (int j = 0; j < k; j++) {
    for (int i = k + 1 - 1; i >= 1; i--) {
      a[i] = (a[i - 1] - j * a[i]) % MOD;
    }
    a[0] = (a[0] * (-j)) % MOD;
  }
  long long kfactinv = divmod(1, factorial[k]);
  for (int i = 0; i < k + 1; i++) a[i] = (a[i] * kfactinv) % MOD;
  long long ans = 0;
  for (int i = 0; i < k + 1; i++) {
    ans = (ans + (a[i] * fib_pow_sum(l + 2, r + 2, i))) % MOD;
  }
  ans = (ans + MOD) % MOD;
  cout << ans << endl;
}