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>
const int NMAX = 3666;
const int MOD = 1000000007;
const int SQRT = 350;
using namespace std;
const int INF = 1000000007;
const int dx[] = {-1, 0, 0, 1};
const int dy[] = {0, 1, -1, 0};
const int MAXN = (1 << 26);
struct cnumber {
  long long first = 0;
  long long second = 0;
  cnumber(){};
  cnumber(long long a, long long b) {
    this->first = a;
    this->second = b;
  }
};
cnumber add(cnumber a, cnumber b) {
  cnumber n;
  n.first = (a.first + b.first) % MOD;
  n.second = (a.second + b.second) % MOD;
  return n;
}
cnumber sub(cnumber a, cnumber b) {
  cnumber n;
  n.first = (a.first - b.first) % MOD;
  n.second = (a.second - b.second) % MOD;
  return n;
}
cnumber mul(cnumber a, cnumber b) {
  cnumber n;
  n.first = ((a.first * b.first) % MOD +
             (1LL * 5 * ((a.second * b.second) % MOD)) % MOD) %
            MOD;
  n.second = ((a.second * b.first) % MOD + (a.first * b.second) % MOD) % MOD;
  return n;
}
cnumber mul(long long s, cnumber a) {
  cnumber n;
  n.first = (s * a.first) % MOD;
  n.second = (s * a.second) % MOD;
  return n;
}
long long bin_exp(long long n, long long p) {
  long long first = 1;
  while (p) {
    if (p & 1) first = (n * first) % MOD;
    p /= 2;
    n = (n * n) % MOD;
  }
  return first;
}
cnumber bin_exp(cnumber n, long long p) {
  cnumber first(1, 0);
  while (p) {
    if (p & 1) first = mul(n, first);
    p /= 2;
    n = mul(n, n);
  }
  return first;
}
long long inv(long long a) { return bin_exp(a, MOD - 2); }
cnumber phi = cnumber(inv(2), inv(2));
cnumber psi = cnumber(inv(2), -inv(2));
long long choose[605][605];
long long s[605][605];
cnumber powsum(cnumber n, long long p) {
  cnumber a(1, 0);
  cnumber first(1, 0);
  cnumber apow = cnumber(n.first, n.second);
  while (p) {
    if (p & 1) first = add(mul(apow, first), a);
    p >>= 1;
    a = add(a, mul(apow, a));
    apow = mul(apow, apow);
  }
  return first;
}
long long solve(long long l, long long r, long long k) {
  cnumber coef = cnumber(0, inv(5));
  cnumber rs = cnumber(0, 0);
  long long rstot = 0;
  for (long long i = 1; i <= k; ++i) {
    rs = cnumber(0, 0);
    for (long long j = 0; j <= i; ++j) {
      long long sign = ((i - j) % 2) ? -1 : 1;
      rs = add(
          rs,
          (mul(sign,
               mul(choose[i][j],
                   (powsum(mul(bin_exp(phi, j), bin_exp(psi, i - j)), r))))));
    }
    rs = mul(coef, rs);
    long long fibosumr = rs.first;
    rs = cnumber(0, 0);
    for (long long j = 0; j <= i; ++j) {
      long long sign = ((i - j) % 2) ? -1 : 1;
      rs = add(rs,
               (mul(sign, mul(choose[i][j],
                              (powsum(mul(bin_exp(phi, j), bin_exp(psi, i - j)),
                                      l - 1))))));
    }
    rs = mul(coef, rs);
    long long fibosuml1 = rs.first;
    rstot =
        (rstot +
         ((((k - i) & 1) ? -1 : 1) * s[k][i] * (fibosumr - fibosuml1)) % MOD) %
        MOD;
    coef = mul(coef, cnumber(0, inv(5)));
  }
  return rstot;
}
long long l, r, k;
long long sfib[20];
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cout << setprecision(12) << fixed;
  sfib[1] = 1;
  sfib[2] = 1;
  for (int i = 3; i <= 15; ++i) sfib[i] = sfib[i - 1] + sfib[i - 2];
  cin >> k >> l >> r;
  l += 2;
  r += 2;
  choose[1][1] = 1;
  choose[1][0] = 1;
  for (int i = 2; i <= 211; ++i)
    for (int j = 0; j <= 211; ++j)
      choose[i][j] = (choose[i - 1][j] + choose[i - 1][j - 1]) % MOD;
  s[1][1] = 1;
  for (int i = 2; i <= 210; ++i)
    for (int j = 1; j <= 210; ++j)
      s[i][j] = (((i - 1) * s[i - 1][j]) % MOD + s[i - 1][j - 1]) % MOD;
  long long grosu = solve(l, r, k);
  if (grosu < 0) grosu += MOD;
  long long fact = 1;
  for (int i = 1; i <= k; ++i) fact = (fact * i) % MOD;
  grosu = (grosu * inv(fact)) % MOD;
  cout << grosu << "\n";
  return 0;
}