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;
long long get(long long k) { return k >= mod ? k - mod : k; }
long long dif(long long k) { return k < 0 ? k + mod : k; }
struct st {
  long long a, b;
  st(void) { a = b = 0; }
  st(long long a, long long b) : a(a), b(b) {}
  st(long long a) : a(a), b(0) {}
};
st operator+(st A, st B) { return st(get(A.a + B.a), get(A.b + B.b)); }
void operator+=(st &A, st B) { A = A + B; }
st operator-(st A, st B) { return st(dif(A.a - B.a), dif(A.b - B.b)); }
void operator-=(st &A, st B) { A = A - B; }
st operator*(st A, st B) {
  return st((5ll * A.b * B.b + 1ll * A.a * B.a) % mod,
            (1ll * A.a * B.b + 1ll * A.b * B.a) % mod);
}
void operator*=(st &A, st B) { A = A * B; }
bool operator==(st a, st b) { return a.a == b.a && a.b == b.b; }
st pow1(st a, long long b) {
  auto ans = st(1, 0);
  while (b) {
    if (b & 1) ans *= a;
    a = a * a;
    b /= 2;
  }
  return ans;
}
long long pow2(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (1ll * ans * a) % mod;
    b /= 2;
    a = (1ll * a * a) % mod;
  }
  return ans;
}
const long long inv = pow2(2, mod - 2);
const auto A = st(inv, inv);
const auto B = st(inv, mod - inv);
const long long Inv = pow2(5, mod - 2);
static long long C[512][512];
static long long F[512];
st iv(st cnt) {
  st ans;
  long long tmp = (5ll * cnt.b * cnt.b) % mod;
  tmp = (mod + 1ll * cnt.a * cnt.a - tmp) % mod;
  tmp = pow2(tmp, mod - 2);
  ans.a = cnt.a;
  ans.b = (mod - cnt.b) % mod;
  ans *= st(tmp);
  assert(ans * cnt == st(1, 0));
  return ans;
}
st geo(st a, long long b) {
  if (a == st(1, 0)) return st(b % mod);
  auto cnt = pow1(a, b + 1) - a;
  return cnt * iv(a - 1);
}
st G(long long l, long long r, st S) { return geo(S, r) - geo(S, l - 1); }
st AA[512];
st BB[512];
long long Fib(long long l, long long r, long long k) {
  st ans = st(0, 0);
  for (long long i = 0; i <= k; ++i) {
    auto cnt = AA[i] * BB[k - i];
    cnt = G(l, r, cnt);
    cnt *= C[k][i];
    if ((k - i) & 1)
      ans -= cnt;
    else
      ans += cnt;
  }
  if (k & 1) return (1ll * ans.b * pow2(Inv, k / 2)) % mod;
  return (1ll * ans.a * pow2(Inv, k / 2)) % mod;
}
int32_t main(void) {
  long long k;
  long long l, r;
  cin >> k >> l >> r;
  l += 2;
  r += 2;
  AA[0] = BB[0] = st(1, 0);
  for (long long i = 1; i <= 500; ++i)
    AA[i] = AA[i - 1] * A, BB[i] = BB[i - 1] * B;
  F[1] = 1;
  for (long long i = 1; i < k; ++i) {
    for (long long j = k; j; --j)
      F[j] = (F[j - 1] + 1ll * F[j] * (mod - i)) % mod;
  }
  for (long long i = 0; i < 512; ++i)
    for (long long j = 0; j <= i; ++j)
      C[i][j] = !i || !j || i == j ? 1 : (C[i - 1][j] + C[i - 1][j - 1]) % mod;
  long long ans = 0;
  for (long long i = 1; i <= k; ++i)
    ans = (ans + 1ll * F[i] * Fib(l, r, i)) % mod;
  long long fact = 1;
  for (long long i = 1; i <= k; ++i) fact = (1ll * fact * i) % mod;
  fact = pow2(fact, mod - 2);
  ans = (1ll * ans * fact) % mod;
  cout << ans << '\n';
  return 0;
}