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 int MAXN = 510;
const int MOD = 1e9 + 7;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) (ch == '-') && (f = -f), ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
template <typename Type>
inline Type expow(Type n, long long k) {
  Type ans(1);
  for (; k; k >>= 1ll, n *= n) (k & 1ll) && (ans *= n, 1);
  return ans;
}
struct modint {
  int data;
  modint(int data = 0) : data(data){};
  inline modint operator+(const modint &tmp) const {
    return tmp.data + data >= MOD ? tmp.data + data - MOD : tmp.data + data;
  }
  inline void operator+=(const modint &tmp) {
    data += tmp.data;
    if (data >= MOD) data -= MOD;
  }
  inline modint operator-(const modint &tmp) const {
    return data < tmp.data ? data - tmp.data + MOD : data - tmp.data;
  }
  inline modint operator-() const { return data != 0 ? MOD - data : 0; }
  inline void operator-=(const modint &tmp) {
    data -= tmp.data;
    if (data < 0) data += MOD;
  }
  inline modint operator*(const modint &tmp) const {
    return 1ll * data * tmp.data % MOD;
  }
  inline void operator*=(const modint &tmp) {
    data = 1ll * data * tmp.data % MOD;
  }
  inline bool operator==(const modint &tmp) const { return data == tmp.data; }
};
struct Complex {
  modint real, imag;
  Complex(modint real = 0, modint imag = 0) : real(real), imag(imag){};
  inline Complex operator+(const Complex &tmp) const {
    return Complex(real + tmp.real, imag + tmp.imag);
  }
  inline Complex &operator+=(const Complex &tmp) {
    real += tmp.real;
    imag += tmp.imag;
    return *this;
  }
  inline Complex operator-(const Complex &tmp) const {
    return Complex(real - tmp.real, imag - tmp.imag);
  }
  inline Complex &operator-=(const Complex &tmp) {
    real -= tmp.real;
    imag -= tmp.imag;
    return *this;
  }
  inline Complex operator*(const Complex &tmp) const {
    return Complex(real * tmp.real + imag * tmp.imag * 5,
                   real * tmp.imag + imag * tmp.real);
  }
  inline Complex &operator*=(const Complex &tmp) {
    Complex rg(real * tmp.real + imag * tmp.imag * 5,
               real * tmp.imag + imag * tmp.real);
    *this = rg;
    return *this;
  }
  inline Complex operator/(const Complex &tmp) const {
    modint rg = expow(tmp.real * tmp.real - tmp.imag * tmp.imag * 5, MOD - 2);
    return Complex((real * tmp.real - imag * tmp.imag * 5) * rg,
                   (imag * tmp.real - real * tmp.imag) * rg);
  }
};
modint fac[MAXN], ifac[MAXN], S[MAXN][MAXN];
inline void init(int n = MAXN - 5) {
  int i, j;
  for (fac[0] = i = 1; i <= n; ++i) fac[i] = fac[i - 1] * i;
  for (ifac[i = n] = expow(fac[n], MOD - 2); i; --i) ifac[i - 1] = ifac[i] * i;
  for (i = 0; i <= n; ++i) S[i][i] = 1;
  for (i = 1; i <= n; ++i) S[0][i] = 0;
  for (i = 1; i <= n; ++i)
    for (j = 1; j <= n; ++j) S[i][j] = S[i - 1][j - 1] + S[i - 1][j] * (i - 1);
}
inline modint C(int n, int m) {
  if (n < m || m < 0) return 0;
  return fac[n] * ifac[m] * ifac[n - m];
}
inline modint solve2(long long l, long long r, int m) {
  int j, k, i;
  l += 2;
  r += 2;
  Complex A(0, expow(modint(5), MOD - 2));
  Complex B(0, expow(modint(MOD - 5), MOD - 2));
  Complex alpha(expow(modint(2), MOD - 2), expow(modint(2), MOD - 2)),
      beta(expow(modint(2), MOD - 2), expow(modint(MOD - 2), MOD - 2));
  modint ans = 0;
  for (j = 1; j <= m; ++j) {
    Complex tmp(0, 0);
    for (k = 0; k <= j; ++k) {
      Complex q = expow(alpha, k) * expow(beta, j - k), rg = modint(0), now;
      now = (expow(q, r + 1) - expow(q, l));
      rg = (q.real == 1 && q.imag == 0) ? modint((r - l + 1) % MOD)
                                        : now / (q - Complex(1));
      rg *= expow(A, k) * expow(B, j - k) * C(j, k);
      tmp += rg;
    }
    assert(tmp.imag == 0);
    if ((m - j) & 1)
      ans -= tmp.real * S[m][j];
    else
      ans += tmp.real * S[m][j];
  }
  return ans * ifac[m];
}
int main() {
  init();
  int k = read();
  long long l = read(), r = read();
  printf("%d\n", solve2(l, r, k).data);
  return 0;
}