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;
const long long M = 1e9 + 7;
const int maxk = 225;
long long s[maxk], c[maxk][maxk];
inline long long nml(long long a) { return ((a % M) + M) % M; }
void exgcd(long long a, long long& x, long long b, long long& y, long long& g) {
  if (b) {
    exgcd(b, y, a % b, x, g);
    y -= a / b * x;
  } else {
    x = 1;
    y = 0;
    g = a;
  }
}
inline long long inv(long long a) {
  long long x, y, g;
  exgcd(M, x, a, y, g);
  return nml(y);
}
inline long long add(long long a, long long b) {
  return (a += b) >= M ? a - M : a;
}
inline long long sub(long long a, long long b) {
  return (a -= b) < 0 ? a + M : a;
}
inline long long mul(long long a, long long b) { return a * b % M; }
inline long long _div(long long a, long long b) { return mul(a, inv(b)); }
inline long long mns(long long a) { return M - a; }
struct mll {
  long long a, b;
  mll(long long x, long long y) : a(nml(x)), b(nml(y)) {}
  mll operator+(long long x) { return mll(add(a, x), b); }
  mll operator-(long long x) { return mll(sub(a, x), b); }
  mll operator*(long long x) { return mll(mul(a, x), mul(b, x)); }
  mll operator/(long long x) {
    x = inv(x);
    return *this * x;
  }
  mll operator+(mll x) { return mll(add(a, x.a), add(b, x.b)); }
  mll operator-(mll x) { return mll(sub(a, x.a), sub(b, x.b)); }
  mll operator*(mll x) {
    return mll(add(mul(a, x.a), mul(5, mul(b, x.b))),
               add(mul(a, x.b), mul(b, x.a)));
  }
  mll operator/(mll x) {
    long long v = sub(mul(x.a, x.a), mul(5, mul(x.b, x.b)));
    return *this * mll(x.a, mns(x.b)) / v;
  }
  mll operator*=(mll x) { return *this = *this * x; }
  mll operator+=(mll x) { return *this = *this + x; }
  mll operator/=(long long x) { return *this = *this / x; }
  bool operator!=(long long x) { return b || a != x; }
};
mll operator*(long long x, mll y) { return y * x; }
mll operator/(long long x, mll y) { return mll(x, 0) / y; }
void precalc(long long k) {
  s[1] = 1;
  for (long long i = 2; i <= k; ++i)
    for (long long j = i; j >= 1; --j)
      s[j] = add(mul(mns(i - 1), s[j]), s[j - 1]);
  for (long long i = 1; i <= k; ++i) {
    c[i][0] = c[i][i] = 1;
    for (long long j = 1; j < i; ++j)
      c[i][j] = add(c[i - 1][j], c[i - 1][j - 1]);
  }
}
mll qpow(mll a, long long x) {
  long long sig = x < 0 ? -1 : 1;
  x *= sig;
  mll ret(1, 0);
  for (; x; x >>= 1, a *= a)
    if (x & 1) ret *= a;
  return (sig > 0) ? ret : (1 / ret);
}
int main() {
  long long k, l, r;
  scanf("%lld%lld%lld", &k, &l, &r);
  {
    int a = 0, b = 1, i = 1;
    for (; b < k; ++i, b += a, a = b - a)
      ;
    if (l + 2 < i) l = i - 2;
    if (r < l) {
      puts("0");
      return 0;
    }
  }
  precalc(k);
  mll isr5 = 1 / mll(0, 1);
  mll phi = mll(1, 1) / 2;
  mll phi2 = phi * phi;
  mll ans(0, 0);
  mll v1 = isr5;
  for (long long j = 1; j <= k; ++j, v1 *= isr5) {
    mll sum(0, 0);
    mll v2 = qpow(phi, -j);
    long long ne = (j & 1) ? mns(1) : 1;
    for (long long m = 0; m <= j; ++m, ne = mul(ne, mns(1)), v2 *= phi2) {
      mll q = ne * v2;
      sum += mul(ne, c[j][m]) *
             (q != 1 ? qpow(q, l + 2) * (qpow(q, r - l + 1) - 1) / (q - 1)
                     : mll(r - l + 1, 0));
    }
    ans += s[j] * v1 * sum;
  }
  long long ik = 1;
  for (long long i = 1; i <= k; ++i) ik = mul(ik, i);
  ans /= ik;
  printf("%lld\n", ans.a);
}