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 ll = long long;
const int mod = 1e9 + 7;
int sqr;
int k, C[655][655], S1[655][655], fac[655], m;
int inv(int x) { return x == 1 ? 1 : (ll)(mod - mod / x) * inv(mod % x) % mod; }
struct exComplex {
  int a, b;
  exComplex(int x = 0, int y = 0) {
    a = x;
    b = y;
  }
  exComplex operator+(const exComplex &y) const {
    return exComplex((a + y.a) % mod, (b + y.b) % mod);
  }
  exComplex operator*(const exComplex &y) const {
    return exComplex(((ll)a * y.a % mod + (ll)sqr * b % mod * y.b % mod) % mod,
                     ((ll)b * y.a % mod + (ll)a * y.b % mod) % mod);
  }
  exComplex operator/(const int &y) const {
    int i = inv(y);
    return exComplex((ll)a * i % mod, (ll)b * i % mod);
  }
};
using num = exComplex;
num A, B, alpha, beta, Ap[655], Bp[655], al[655], be[655];
num qpow(num x, ll y) {
  if (y == 0) return num(1, 0);
  num d = qpow(x, y >> 1);
  d = d * d;
  if (y & 1) d = d * x;
  return d;
}
std::pair<num, num> sum(num w, ll n) {
  if (n == 1) return {w, w};
  auto P = sum(w, n / 2);
  num L = P.first;
  num pw = P.second;
  L = L + pw * L;
  pw = pw * pw;
  if (n & 1) {
    pw = pw * w;
    L = L + pw;
  }
  return {L, pw};
}
int calc(ll n) {
  if (n == 0) return 0;
  num ans;
  for (int i = 0; i <= k; ++i) {
    Ap[i] = qpow(A, i);
    Bp[i] = qpow(B, i);
    al[i] = qpow(alpha, i);
    be[i] = qpow(beta, i);
  }
  for (int j = 0; j <= k; ++j) {
    auto det = [](int x) { return x & 1 ? mod - 1 : 1; };
    int coef = (ll)det(k - j) * S1[k][j] % mod;
    for (int x = 0; x <= j; ++x) {
      num c2 = Ap[x] * Bp[j - x];
      num w = al[x] * be[j - x];
      ans = ans + num(C[j][x], 0) * num(coef, 0) * sum(w, n).first * c2;
    }
  }
  return (ll)ans.a * inv(fac[k]) % mod;
}
void solve() {
  ll l, r;
  scanf("%d%lld%lld", &k, &l, &r);
  l++;
  r++;
  fac[0] = 1;
  for (int i = 1; i <= k; ++i) fac[i] = (ll)fac[i - 1] * i % mod;
  for (int i = 0; i <= k; ++i) {
    C[i][0] = 1;
    for (int j = 1; j <= i; ++j)
      C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % mod;
  }
  S1[0][0] = 1;
  for (int i = 1; i <= k; ++i)
    for (int j = 1; j <= i; ++j)
      S1[i][j] = (S1[i - 1][j - 1] + (ll)S1[i - 1][j] * (i - 1) % mod) % mod;
  int ans = (calc(r) - calc(l - 1) + mod) % mod;
  printf("%d\n", ans);
}
int main() {
  sqr = 5;
  A = num(5, 1) / 10;
  B = num(5, mod - 1) / 10;
  alpha = num(1, 1) / 2;
  beta = num(1, mod - 1) / 2;
  solve();
  return 0;
}