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;
using lli = int64_t;
const lli mod = 1e9 + 7;
lli power(lli a, lli b) {
  lli ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    b >>= 1;
    a = a * a % mod;
  }
  return ans;
}
vector<lli> mul(const vector<lli>& a, const vector<lli>& b,
                const vector<lli>& m) {
  vector<lli> c(2);
  c[0] = a[0] * b[0] % mod;
  c[1] = (a[0] * b[1] % mod + a[1] * b[0] % mod) % mod;
  lli c2 = a[1] * b[1] % mod;
  (c[1] += c2 * m[1]) %= mod;
  (c[0] += c2 * m[0]) %= mod;
  return c;
}
vector<lli> power(vector<lli> a, lli n, const vector<lli>& m) {
  vector<lli> ans(2);
  ans[0] = 1;
  while (n) {
    if (n & 1) ans = mul(ans, a, m);
    n >>= 1;
    a = mul(a, a, m);
  }
  return ans;
}
struct num {
  lli a, b;
  num() : a(0), b(0) {}
  num(lli a) : a(a), b(0) {}
  num(lli a, lli b) : a(a), b(b) {}
  num operator+(const num& rhs) const {
    return num((a + rhs.a) % mod, (b + rhs.b) % mod);
  }
  num operator-(const num& rhs) const {
    return num(((a - rhs.a) % mod + mod) % mod,
               ((b - rhs.b) % mod + mod) % mod);
  }
  num operator*(const lli& k) const { return num(a * k % mod, b * k % mod); }
  num operator/(const lli& k) const {
    lli rev = power(k, mod - 2);
    return num(a * rev % mod, b * rev % mod);
  }
  num operator*(const num& rhs) const {
    lli A = (a * rhs.a % mod + 5 * b * rhs.b % mod) % mod;
    lli B = (a * rhs.b % mod + b * rhs.a % mod) % mod;
    return num(A, B);
  }
  num operator/(const num& rhs) const {
    lli den =
        ((rhs.a * rhs.a % mod - 5 * rhs.b * rhs.b % mod) % mod + mod) % mod;
    return num(a, b) * num(rhs.a, (-rhs.b + mod) % mod) / den;
  }
  num operator^(const lli& n) const {
    auto pol = power(
        {0, 1}, n,
        {((5 * b * b % mod - a * a % mod) % mod + mod) % mod, 2 * a % mod});
    return num((a * pol[1] % mod + pol[0]) % mod, b * pol[1] % mod);
  }
  bool operator==(const num& rhs) const { return a == rhs.a && b == rhs.b; }
};
const num x = num(power(2, mod - 2), power(2, mod - 2));
const num y = num(power(2, mod - 2), mod - power(2, mod - 2));
const int M = 250;
lli ncr[M + 1][M + 1];
vector<lli> mult_pol(const vector<lli>& a, const vector<lli>& b) {
  vector<lli> c(a.size() + b.size() - 1);
  for (int i = 0; i < a.size(); ++i) {
    for (int j = 0; j < b.size(); ++j) {
      (c[i + j] += a[i] * b[j]) %= mod;
    }
  }
  return c;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ncr[0][0] = 1;
  for (int i = 1; i <= M; ++i) {
    ncr[i][0] = ncr[i][i] = 1;
    for (int j = 1; j < i; ++j) {
      ncr[i][j] = (ncr[i - 1][j - 1] + ncr[i - 1][j]) % mod;
    }
  }
  int k;
  lli l, r;
  cin >> k >> l >> r;
  vector<lli> stirling(1, 1);
  for (int i = 0; i < k; ++i) {
    stirling = mult_pol(stirling, {(-i + mod) % mod, 1ll});
  }
  auto T = [&](int j, lli n) {
    num ans = 0;
    num down = x ^ j;
    num down_delta = y / x;
    num up = down ^ (n + 3);
    num up_delta = down_delta ^ (n + 3);
    int alt = 1;
    for (int r = 0; r <= j; ++r) {
      if (down == 1) {
        ans = ans + ((n + 3) % mod) * ncr[j][r] * alt;
      } else {
        ans = ans + (up - 1) / (down - 1) * ncr[j][r] * alt;
      }
      up = up * up_delta;
      down = down * down_delta;
      alt = mod - alt;
    }
    if (j & 1) {
      ans = ans / num(0, power(5, j / 2));
    } else {
      ans = ans / num(power(5, j / 2), 0);
    }
    return (ans - 1).a;
  };
  lli ans = 0;
  for (int j = 1; j <= k; ++j) {
    (ans += stirling[j] * (T(j, r) - T(j, l - 1))) %= mod;
  }
  for (int i = 1; i <= k; ++i) {
    ans = ans * power(i, mod - 2) % mod;
  }
  if (ans < 0) ans += mod;
  cout << ans << "\n";
  return 0;
}