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;
template <typename T>
void chkmin(T &a, T b) {
  a = min(a, b);
}
template <typename T>
void chkmax(T &a, T b) {
  a = max(a, b);
}
inline long long fread(void) {
  long long ret = 0, op = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') op = -1;
  for (; isdigit(ch); ch = getchar()) ret = (ret << 1) + (ret << 3) - '0' + ch;
  return ret * op;
}
const long long MAXN = 2000 + 10;
const long long mod = 1e9 + 7;
const long long MAXM = +10;
long long S(long long x) { return (x % mod + mod) % mod; }
long long fpow(long long base, long long top) {
  long long ret = 1;
  base %= mod;
  for (; top; top >>= 1) {
    if (top & 1) ret = 1ll * ret * base % mod;
    base = 1ll * base * base % mod;
  }
  return ret;
}
struct Complex {
  long long re, im;
  Complex() { re = im = 0; }
  Complex(long long _re, long long _im) : re(_re % mod), im(_im % mod) {}
  Complex operator+(const Complex &you) {
    return Complex(S(re + you.re) % mod, S(im + you.im));
  }
  Complex operator-(const Complex &you) {
    return Complex(S(re - you.re), S(im - you.im));
  }
  Complex operator*(const Complex &you) {
    return Complex(S(1ll * re * you.re % mod + 5ll * im % mod * you.im % mod),
                   S(1ll * re * you.im % mod + 1ll * you.re * im % mod));
  }
  Complex operator-(long long k) { return Complex(S(re - k), im); }
  Complex operator/(const Complex &you) {
    Complex ret(0, 0);
    long long iv =
        fpow(S(1ll * you.re * you.re % mod - 5ll * you.im % mod * you.im % mod),
             mod - 2);
    ret.re = 1ll * S(1ll * re * you.re % mod - 5ll * im % mod * you.im % mod) *
             iv % mod;
    ret.im =
        1ll * S(1ll * im * you.re % mod - 1ll * re * you.im % mod) * iv % mod;
    return ret;
  }
  void pt(void) { printf("re is %d, im is %d\n", re, im); }
};
long long fac[MAXN], ifac[MAXN];
long long L, R, k, S1[MAXN][MAXN];
long long binom(long long n, long long m) {
  return 1ll * fac[n] * ifac[m] % mod * ifac[n - m] % mod;
}
Complex Fpow(Complex base, long long top) {
  Complex ret = Complex(1, 0);
  for (; top; top >>= 1) {
    if (top & 1) ret = ret * base;
    base = base * base;
  }
  return ret;
}
Complex A, B, X, Y;
inline void init(void) {
  k = fread();
  L = fread() + 2, R = fread() + 2;
  S1[0][0] = 1;
  for (long long i = 1; i <= k; ++i) {
    S1[i][0] = 0;
    S1[i][i] = 1;
    for (long long j = 1; j < i; ++j) {
      S1[i][j] = (S1[i - 1][j - 1] + 1ll * (i - 1) * S1[i - 1][j]) % mod;
    }
  }
  fac[0] = 1;
  for (long long i = 1; i <= k; ++i) fac[i] = 1ll * fac[i - 1] * i % mod;
  ifac[k] = fpow(fac[k], mod - 2);
  for (long long i = k - 1; i >= 0; --i)
    ifac[i] = 1ll * ifac[i + 1] * (i + 1) % mod;
}
Complex getSum(Complex p, long long l, long long r) {
  if (p.re == 1 && p.im == 0) return Complex(S((r - l + 1) % mod), 0);
  return (Fpow(p, r + 1) - Fpow(p, l)) / (p - 1);
}
inline void work(void) {
  long long inv2 = fpow(2, mod - 2), inv5 = fpow(5, mod - 2);
  A = Complex(0, inv5);
  B = Complex(0, mod - inv5);
  X = Complex(inv2, inv2);
  Y = Complex(inv2, mod - inv2);
  long long Ans = 0;
  for (long long i = 1; i <= k; ++i) {
    Complex res(0, 0);
    for (long long j = 0; j <= i; ++j) {
      Complex tmp = Complex(binom(i, j), 0) * Fpow(A, j) * Fpow(B, i - j);
      tmp = tmp * getSum(Fpow(X, j) * Fpow(Y, i - j), L, R);
      res = res + tmp;
    }
    res.re = 1ll * res.re * S1[k][i] % mod;
    if ((k - i) & 1)
      Ans = S(Ans - res.re);
    else
      Ans = (Ans + res.re) % mod;
  }
  Ans = 1ll * Ans * ifac[k] % mod;
  cout << Ans;
}
int main() {
  init();
  work();
  return 0;
}