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>
template <typename T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  bool flag = false;
  while (!isdigit(c)) {
    if (c == '-') flag = true;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 + (c ^ 48), c = getchar();
  if (flag) x = -x;
}
using namespace std;
const int P = 1e9 + 7;
const int inv2 = (P + 1) / 2;
inline long long quickpow(long long x, long long k) {
  long long res = 1;
  x %= P;
  while (k) {
    if (k & 1) res = res * x % P;
    x = x * x % P;
    k >>= 1;
  }
  return res;
}
int k;
long long s[230][230], tri[230][230], jie[230], jieni[230];
inline void init() {
  s[0][0] = 1;
  for (int i = 1; i <= k; ++i)
    for (int j = 1; j <= i; ++j)
      s[i][j] = (s[i - 1][j - 1] + s[i - 1][j] * (i - 1)) % P;
  tri[1][1] = 1;
  for (int i = 2; i <= k + 1; ++i)
    for (int j = 1; j <= i; ++j)
      tri[i][j] = (tri[i - 1][j - 1] + tri[i - 1][j]) % P;
  jie[0] = jieni[0] = 1;
  for (int i = 1; i <= k; ++i) jie[i] = jie[i - 1] * i % P;
  jieni[k] = quickpow(jie[k], P - 2);
  for (int i = k - 1; i; --i) jieni[i] = jieni[i + 1] * (i + 1) % P;
}
inline long long get_c(int n, int m) {
  if (n < 0 || m < 0 || n - m < 0) return 0;
  return tri[n + 1][m + 1];
}
struct Complex {
  long long a, b;
  Complex() { a = 0, b = 0; }
  Complex(long long jzp, long long zzz) { a = jzp, b = zzz; }
} phi, phihat;
inline Complex operator+(const Complex &a, const Complex &b) {
  return Complex((a.a + b.a) % P, (a.b + b.b) % P);
}
inline Complex operator-(const Complex &a, const Complex &b) {
  return Complex((a.a - b.a) % P, (a.b - b.b) % P);
}
inline Complex operator*(const Complex &a, const Complex &b) {
  return Complex((a.a * b.a + 5 * a.b * b.b) % P, (a.a * b.b + a.b * b.a) % P);
}
inline Complex get_inv(Complex x) {
  long long a = x.a, b = x.b;
  if (!b) return Complex(quickpow(a, P - 2), 0);
  long long d = b * quickpow((5ll * b * b - a * a) % P, P - 2) % P;
  long long c = -a * quickpow(b, P - 2) % P * d % P;
  Complex res = Complex(c, d);
  return res;
}
inline Complex Pow(Complex x, long long k) {
  Complex res(1, 0);
  while (k) {
    if (k & 1) res = res * x;
    x = x * x;
    k >>= 1;
  }
  return res;
}
inline long long work(long long n) {
  Complex ans;
  for (int j = 0; j <= k; ++j) {
    Complex res;
    for (int d = 0; d <= j; ++d) {
      Complex A = Pow(phi, d) * Pow(phihat, j - d);
      if (A.a == 1 && A.b == 0) {
        if ((j - d) & 1)
          res = res - Complex(n % P * get_c(j, d) % P, 0);
        else
          res = res + Complex(n % P * get_c(j, d) % P, 0);
      }
      A = A * (Complex(1, 0) - Pow(A, n)) * get_inv(Complex(1, 0) - A);
      if ((j - d) & 1)
        res = res - Complex(get_c(j, d), 0) * A;
      else
        res = res + Complex(get_c(j, d), 0) * A;
    }
    if ((k - j) & 1)
      ans = ans - Complex(s[k][j], 0) * Pow(get_inv(Complex(0, 1)), j) * res;
    else
      ans = ans + Complex(s[k][j], 0) * Pow(get_inv(Complex(0, 1)), j) * res;
  }
  ans = ans * Complex(jieni[k], 0);
  if (ans.b) puts("wawa");
  return ans.a;
}
int main() {
  phi = Complex(inv2, inv2);
  phihat = Complex(inv2, P - inv2);
  read(k);
  init();
  long long l, r;
  read(l), read(r);
  l += 2;
  r += 2;
  long long ans = work(r) - work(l - 1);
  printf("%lld\n", (ans % P + P) % P);
  return 0;
}