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 mod = 1000000007;
template <class U>
void ref(U& x) {
  if (x >= mod) x -= mod;
  if (x < 0) x += mod;
}
int sum(int64_t a, int64_t b) { return (a + b) % mod; }
int product(int64_t a, int64_t b) { return a * b % mod; }
int power(int64_t a, int64_t n) {
  int ret = 1;
  for (; n > 0; n >>= 1) {
    if (n & 1) ret = product(ret, a);
    a = product(a, a);
  }
  return ret;
}
std::pair<int, int> sum(std::pair<int, int> a, std::pair<int, int> b) {
  return std::make_pair((a.first + b.first) % mod, (a.second + b.second) % mod);
}
std::pair<int, int> diff(std::pair<int, int> a, std::pair<int, int> b) {
  return std::make_pair(((a.first - b.first) % mod + mod) % mod,
                        ((a.second - b.second) % mod + mod) % mod);
}
std::pair<int, int> product(std::pair<int, int> a, std::pair<int, int> b) {
  std::pair<int, int> ret;
  ret.first = ((int64_t)a.first * b.first % mod +
               (int64_t)5 * a.second * b.second % mod) %
              mod;
  ret.second =
      ((int64_t)a.first * b.second % mod + (int64_t)a.second * b.first % mod) %
      mod;
  return ret;
}
std::pair<int, int> product(std::pair<int, int> a, int64_t x) {
  return std::make_pair(x * a.first % mod, x * a.second % mod);
}
std::pair<int, int> power(std::pair<int, int> a, int64_t n) {
  std::pair<int, int> ret = {1, 0};
  for (; n > 0; n >>= 1) {
    if (n & 1) ret = product(ret, a);
    a = product(a, a);
  }
  return ret;
}
std::pair<int, int> inv(std::pair<int, int> a) {
  return product({a.first % mod, (mod - a.second % mod) % mod},
                 power(((int64_t)a.first * a.first % mod -
                        (int64_t)5 * a.second * a.second % mod + mod) %
                           mod,
                       mod - 2));
}
std::pair<int, int> _div(std::pair<int, int> a, std::pair<int, int> b) {
  return product(a, inv(b));
}
const int K = 200;
const int inv_2 = (mod + 1) / 2;
const int inv_5 = power(5, mod - 2);
int k;
int poly_c[K + 1];
int combin[K + 1][K + 1];
std::pair<int, int> pow_base[K + 1], pow_base2[K + 1];
int sigma_fib_pow(int64_t l, int64_t r, int m) {
  std::pair<int, int> tmp = {1, 0};
  std::pair<int, int> ret, base;
  int I = (m & 1) ? -1 : 1;
  for (int i = 0; i <= m; ++i) {
    base = product(pow_base[i], pow_base2[m - i]);
    if (base == tmp)
      ret = sum(ret, product({(r - l + 1) % mod, 0}, mod + I * combin[m][i]));
    else
      ret = sum(ret, product(_div(diff(power(base, r + 1), power(base, l)),
                                  diff(base, tmp)),
                             mod + I * combin[m][i]));
    I *= -1;
  }
  ret = product(ret, power({0, inv_5}, m));
  return ret.first;
}
int main() {
  std::ios_base::sync_with_stdio(0);
  std::cin.tie(0);
  int64_t l, r;
  std::cin >> k >> l >> r;
  poly_c[1] = 1;
  for (int i = 1; i < k; ++i) {
    for (int j = i + 1; j > 0; --j) poly_c[j] = poly_c[j - 1];
    for (int j = 1; j <= i; ++j) {
      poly_c[j] = sum(poly_c[j], mod - product(poly_c[j + 1], i));
    }
  }
  int inv_facK = 1;
  for (int i = 2; i <= k; ++i) inv_facK = product(inv_facK, i);
  inv_facK = power(inv_facK, mod - 2);
  for (int i = 1; i <= k; ++i) poly_c[i] = product(poly_c[i], inv_facK);
  combin[0][0] = 1;
  for (int i = 1; i <= k; ++i) {
    for (int j = 0; j <= i; ++j) {
      combin[i][j] = sum(combin[i][j], combin[i - 1][j]);
      if (j > 0) combin[i][j] = sum(combin[i][j], combin[i - 1][j - 1]);
    }
  }
  pow_base[0] = pow_base2[0] = {1, 0};
  for (int i = 1; i <= k; ++i) {
    pow_base[i] = product(pow_base[i - 1], {inv_2, inv_2});
    pow_base2[i] = product(pow_base2[i - 1], {inv_2, mod - inv_2});
  }
  int result = 0;
  for (int i = 1; i <= k; ++i) {
    result = sum(result, product(poly_c[i], sigma_fib_pow(l + 2, r + 2, i)));
  }
  std::cout << result << "\n";
}