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;
long long int p = 1000000007;
long long int modPow(long long int x, long long int n) {
  if (n == 0) {
    return 1;
  }
  long long int y = modPow(x, n / 2);
  if (n % 2 == 0) {
    return (y * y) % p;
  } else {
    return (((y * y) % p) * x) % p;
  }
}
long long int inverse(long long int x) { return modPow(x, p - 2); }
pair<long long int, long long int> Mult(pair<long long int, long long int> x,
                                        pair<long long int, long long int> y) {
  return {(((x.first * y.first + 5 * x.second * y.second) % p) + p) % p,
          (((x.first * y.second + x.second * y.first) % p) + p) % p};
}
pair<long long int, long long int> Add(pair<long long int, long long int> x,
                                       pair<long long int, long long int> y) {
  return {(((x.first + y.first) % p) + p) % p,
          (((x.second + y.second) % p) + p) % p};
}
pair<long long int, long long int> pairPow(pair<long long int, long long int> x,
                                           long long int n) {
  if (n == 0) {
    return {1, 0};
  }
  pair<long long int, long long int> y = pairPow(x, n / 2);
  if (n % 2 == 0) {
    return Mult(y, y);
  } else {
    return Mult(Mult(y, y), x);
  }
}
long long int Fib(long long int n) {
  return (Mult(Add(pairPow({1, 1}, n), Mult(pairPow({1, -1}, n), {-1, 0})),
               {inverse(modPow(2, n)), 0}))
      .second;
}
int main() {
  long long int k, l, r;
  cin >> k >> l >> r;
  while (Fib(l + 2) < k) {
    l++;
  }
  if (l > r) {
    cout << "0";
    return 0;
  }
  long long int a[k + 1];
  for (int i = 0; i <= k; ++i) {
    a[i] = 0;
  }
  a[1] = 1;
  for (long long int i = 1; i < k; ++i) {
    for (int j = k; j > 0; --j) {
      a[j] = a[j - 1] - i * a[j];
      a[j] = (a[j] % p + p) % p;
    }
  }
  long long int C[k + 1][k + 1];
  for (int i = 0; i <= k; ++i) {
    C[0][i] = 0;
  }
  for (int i = 0; i <= k; ++i) {
    C[i][0] = 1;
  }
  for (int i = 1; i <= k; ++i) {
    for (int j = 1; j <= k; ++j) {
      C[i][j] = C[i - 1][j - 1] + C[i - 1][j];
      C[i][j] %= p;
    }
  }
  long long int S1 = 0;
  for (long long int j = 0; j <= k; ++j) {
    if (j == 0) {
      S1 += (((a[j] * (r - l + 1)) % p) + p) % p;
    } else {
      pair<long long int, long long int> S2 = {0, 0};
      for (long long int q = 0; q <= j; ++q) {
        if (q * 2 == j && j % 4 == 0) {
          long long int k_ = (((r - l + 1) % p) + p) % p;
          S2 = Add(S2, Mult(Mult({k_, 0}, Mult(pairPow({0, 1}, j),
                                               {inverse(modPow(5, j)), 0})),
                            {C[j][q], 0}));
        } else {
          pair<long long int, long long int> U = {1, 1}, V = {1, -1}, UV;
          UV = Mult(pairPow(U, j - q), pairPow(V, q));
          pair<long long int, long long int> A, B, C_, D;
          A = pairPow(UV, r + 1);
          B = Mult(pairPow(UV, l), {modPow(modPow(2, j), r + 1 - l), 0});
          B.first = -B.first;
          B.second = -B.second;
          C_ = Add(Mult(UV, {modPow(modPow(2, j), r + 2), 0}),
                   {-modPow(modPow(2, j), r + 3), 0});
          long long int Q =
              (((C_.first * C_.first - 5 * C_.second * C_.second) % p) + p) % p;
          C_.second = -C_.second;
          D = Mult(Mult(Add(A, B), C_), {inverse(Q), 0});
          S2 = Add(S2,
                   Mult(Mult(Mult(Mult(D, pairPow(UV, 2)), {C[j][q], 0}),
                             {1 - (q % 2) * 2, 0}),
                        Mult(pairPow({0, 1}, j), {inverse(modPow(5, j)), 0})));
        }
      }
      S1 = (((S1 + a[j] * S2.first) % p) + p) % p;
    }
  }
  long long int F = 1;
  for (long long int i = 1; i <= k; ++i) {
    F = (F * i) % p;
  }
  S1 = (((S1 * inverse(F)) % p) + p) % p;
  cout << S1;
}