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;
long long mod = 1e9 + 7;
long long CC;
long long qpow(long long x, long long n) {
  long long ret = 1;
  x %= mod;
  while (n) {
    if (n & 1) ret = ret * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return ret;
}
struct Complex {
  long long a, b;
  long long c;
  Complex(long long a = 0, long long b = 0, long long c = CC)
      : a(a), b(b), c(c) {}
  Complex operator+(const Complex &x) const {
    Complex res;
    res.a = a + x.a;
    res.b = b + x.b;
    if (res.a >= mod) res.a -= mod;
    if (res.b >= mod) res.b -= mod;
    return res;
  }
  Complex operator-(const Complex &x) const {
    Complex res;
    res.a = a - x.a + mod;
    res.b = b - x.b + mod;
    if (res.a >= mod) res.a -= mod;
    if (res.b >= mod) res.b -= mod;
    return res;
  }
  Complex operator*(const Complex &x) const {
    Complex res;
    res.a = (a * x.a + c * b % mod * x.b) % mod;
    res.b = (a * x.b + x.a * b) % mod;
    return res;
  }
  Complex operator*(const long long &x) const {
    return Complex(this->a * x % mod, this->b * x % mod);
  }
  Complex operator^(long long t) const {
    Complex res = Complex(1, 0);
    Complex a = *this;
    a.a %= mod;
    a.b %= mod;
    while (t) {
      if (t & 1) res = res * a;
      a = a * a;
      t >>= 1;
    }
    return res;
  }
  Complex inv() {
    long long down = (this->a * this->a % mod -
                      this->b * this->b % mod * this->c % mod + mod) %
                     mod;
    down = qpow(down, mod - 2);
    return Complex(this->a, mod - this->b) * down;
  }
  Complex operator/(Complex &x) const { return *this * (x.inv()); }
};
long long T, m;
long long inv2, sqr;
long long fac;
long long s[2333][2333], C[2333][2333];
Complex bb, aa, A, B;
long long calc(long long n, long long k) {
  long long ans = 0;
  for (long long j = 0, fu = (k % 2 ? mod - 1 : 1); j <= k;
       j++, fu = mod - fu) {
    Complex now = Complex(0, 0);
    for (long long d = 0; d <= j; d++) {
      Complex tmm = (bb ^ d) * (aa ^ (j - d));
      Complex tpp = (tmm ^ (n + 1));
      if (tmm.a == 1 && tmm.b == 0)
        tpp = Complex((n + 1) % mod, 0);
      else {
        tmm = (Complex(1, 0) - tmm).inv();
        tpp = (Complex(1, 0) - tpp) * tmm;
      }
      tpp = tpp * (B ^ d) * (A ^ (j - d));
      tpp = tpp * C[j][d];
      now = now + tpp;
    }
    ans = (ans + s[k][j] * fu % mod * now.a % mod) % mod;
  }
  return ans * fac % mod;
}
int main() {
  T = 1;
  m = 2;
  s[0][0] = C[0][0] = 1;
  for (long long i = 1; i <= 502; i++) {
    C[i][0] = 1;
    for (long long j = 1; j <= 502; j++) {
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;
      s[i][j] = (s[i - 1][j] * (i - 1) % mod + s[i - 1][j - 1]) % mod;
    }
  }
  inv2 = qpow(2, mod - 2);
  if (m == 2) {
    CC = 5;
    aa = Complex(inv2, inv2);
    bb = Complex(inv2, mod - inv2);
    A = Complex(0, qpow(5, mod - 2));
    B = Complex(0, mod - qpow(5, mod - 2));
  } else {
    CC = 3;
    aa = Complex(2, mod - 1);
    bb = Complex(2, 1);
    A = Complex(inv2, mod - qpow(6, mod - 2));
    B = Complex(inv2, qpow(6, mod - 2));
  }
  while (T--) {
    long long le, ri, k;
    scanf("%lld%lld%lld", &k, &le, &ri);
    fac = 1;
    for (long long i = 1; i <= k; i++) fac = fac * i % mod;
    fac = qpow(fac, mod - 2);
    if (m == 2) {
      ri += 2;
      le += 2;
    } else {
      le = (le - 1) / 2;
      ri = ri / 2;
    }
    long long ans = (calc(ri, k) - calc(le - 1, k) + mod) % mod;
    printf("%lld\n", ans);
  }
  return 0;
}