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 std::abs;
using std::bitset;
using std::cerr;
using std::cin;
using std::copy;
using std::cout;
using std::deque;
using std::endl;
using std::fill;
using std::fixed;
using std::greater;
using std::iota;
using std::istream;
using std::lower_bound;
using std::make_pair;
using std::make_tuple;
using std::map;
using std::max;
using std::max_element;
using std::min;
using std::min_element;
using std::multiset;
using std::next_permutation;
using std::nth_element;
using std::ostream;
using std::pair;
using std::priority_queue;
using std::queue;
using std::reverse;
using std::rotate;
using std::set;
using std::sort;
using std::string;
using std::swap;
using std::tie;
using std::tuple;
using std::unique;
using std::unordered_map;
using std::unordered_set;
using std::upper_bound;
using std::vector;
long long rnd(long long x, long long y) {
  static auto gen = std::bind(std::uniform_int_distribution<long long>(),
                              std::mt19937(960172));
  return gen() % (y - x + 1) + x;
}
long long gcd(long long a, long long b) {
  while (b > 0) {
    long long t = a % b;
    a = b;
    b = t;
  }
  return a;
}
template <typename T>
T sqr(T const& a) {
  return a * a;
}
int const INF = 100 + (int)1e9;
long long const INFL = 100 + (long long)1e18;
long double const PI = 3.1415926535897932384626433832795028;
int const mod = 1000000007;
void add(int& a, int b) {
  a += b;
  if (a >= mod) a -= mod;
}
int prod(int a, int b) { return (long long)a * b % mod; }
int modpow(int a, int b) {
  int ret = 1;
  for (; b > 0; b /= 2) {
    if (b % 2 == 1) {
      ret = prod(ret, a);
    }
    a = prod(a, a);
  }
  return ret;
}
int modinv(int a) { return modpow(a, mod - 2); }
struct irr {
  int a, b;
  irr() : a(0), b(0) {}
  irr(int x, int y) : a(x), b(y) {
    if (a >= mod) a -= mod;
    if (b >= mod) b -= mod;
  }
  irr& operator+=(irr const& x) {
    add(a, x.a);
    add(b, x.b);
    return *this;
  }
};
irr operator+(irr a, irr const& b) { return a += b; }
irr operator*(irr const& a, irr const& b) {
  return irr((prod(a.a, b.a) + 5LL * prod(a.b, b.b)) % mod,
             (prod(a.a, b.b) + prod(a.b, b.a)) % mod);
}
irr const one(1, 0);
irr const zero(0, 0);
irr const phi(modinv(2), modinv(2));
irr const psi(modinv(2), mod - modinv(2));
irr const alpha(0, modinv(5));
irr const beta(0, mod - modinv(5));
int const K = 222;
irr phis[K], psis[K], alphas[K], betas[K];
int c[K][K];
irr prog(irr a, long long n) {
  if (!n) return zero;
  if (n % 2) return one + a * prog(a, n - 1);
  return prog(a * a, n / 2) * (one + a);
}
int solve(long long n, int k) {
  irr ret(0, 0);
  for (int i = 0; i <= k; ++i) {
    for (int j = 0; j <= k; ++j) {
      irr now = irr(c[i][j], 0) * alphas[i] * betas[j];
      ret += now * prog(phis[i] * psis[j], n + 1);
    }
  }
  return ret.a;
}
void solve() {
  int k;
  long long l, r;
  scanf("%d%I64d%I64d", &k, &l, &r);
  phis[0] = psis[0] = alphas[0] = betas[0] = irr(1, 0);
  for (int i = 1; i <= k; ++i) {
    phis[i] = phis[i - 1] * phi;
    psis[i] = psis[i - 1] * psi;
    alphas[i] = alphas[i - 1] * alpha;
    betas[i] = betas[i - 1] * beta;
  }
  c[0][0] = 1;
  for (int x = 0; x < k; ++x) {
    static int t[K][K];
    for (int i = 0; i <= k; ++i) {
      for (int j = 0; j <= k; ++j) {
        add(t[i + 1][j], c[i][j]);
        add(t[i][j + 1], c[i][j]);
        add(t[i][j], prod(c[i][j], mod - x));
      }
    }
    for (int i = 0; i <= k; ++i) {
      copy(t[i], t[i] + k + 1, c[i]);
      fill(t[i], t[i] + k + 1, 0);
    }
  }
  int fact = 1;
  for (int i = 1; i <= k; ++i) {
    fact = prod(fact, i);
  }
  int inv_fact = modinv(fact);
  for (int i = 0; i <= k; ++i) {
    for (int j = 0; j <= k; ++j) {
      c[i][j] = prod(c[i][j], inv_fact);
    }
  }
  printf("%d\n", (solve(r + 2, k) - solve(l + 1, k) + mod) % mod);
}
int main() {
  cout.precision(15);
  cout << fixed;
  cerr.precision(6);
  cerr << fixed;
  solve();
}