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 mo = 1000000007;
const int N = 505;
struct Num {
  int a, b;
  Num() {}
  Num(int _a, int _b) {
    a = _a;
    b = _b;
  }
  Num operator+(const Num &x) const {
    return Num((a + x.a) % mo, (b + x.b) % mo);
  }
  Num operator-(const Num &x) const {
    return Num((a + mo - x.a) % mo, (b + mo - x.b) % mo);
  }
  Num operator*(const Num &x) const {
    return Num((1ll * a * x.a + 5ll * b * x.b) % mo,
               (1ll * a * x.b + 1ll * b * x.a) % mo);
  }
  Num operator*(const int &x) const {
    return Num(1ll * a * x % mo, 1ll * b * x % mo);
  }
};
int K;
long long l, r;
Num pA[N], pB[N], pv[N];
int fac[N], inv[N];
int f[N], v[N];
void init() {
  fac[0] = inv[0] = inv[1] = 1;
  for (int i = (int)(2); i <= (int)(N - 1); i++)
    inv[i] = 1ll * inv[mo % i] * (mo - mo / i) % mo;
  for (int i = (int)(1); i <= (int)(N - 1); i++)
    inv[i] = 1ll * inv[i - 1] * inv[i] % mo;
  for (int i = (int)(1); i <= (int)(N - 1); i++)
    fac[i] = 1ll * fac[i - 1] * i % mo;
}
int Binom(int x, int y) {
  if (x < 0 || y < 0 || y > x) return 0;
  return 1ll * fac[x] * inv[y] % mo * inv[x - y] % mo;
}
Num power(Num a, long long b) {
  Num s(1, 0);
  for (; b; b /= 2, a = a * a)
    if (b & 1) s = s * a;
  return s;
}
Num Qsum(long long l, long long r, Num A) {
  Num p1(1, 0), s1(0, 0), p2 = A, s2(1, 0);
  long long T = r - l + 1;
  for (; T;) {
    if (T & 1) {
      s1 = s1 + p1 * s2;
      p1 = p1 * p2;
    }
    if (T /= 2) {
      s2 = s2 + p2 * s2;
      p2 = p2 * p2;
    }
  }
  s1 = s1 * power(A, l);
  return s1;
}
int main() {
  scanf("%d%lld%lld", &K, &l, &r);
  Num B((mo + 1) / 2, (mo + 1) / 2);
  Num C((mo + 1) / 2, (mo - 1) / 2);
  Num A(0, (2 * mo + 1) / 5);
  init();
  for (int i = (int)(0); i <= (int)(K); i++)
    for (int j = (int)(0); j <= (int)(K - i); j++) {
      Num tmp = Qsum(l + 2, r + 2, power(B, i) * power(C, j));
      pv[i + j] = pv[i + j] + tmp * Binom(i + j, i) * (j & 1 ? mo - 1 : 1);
    }
  for (int i = (int)(0); i <= (int)(K); i++) v[i] = (pv[i] * power(A, i)).a;
  f[0] = 1;
  for (int i = (int)(1); i <= (int)(K); i++)
    for (int j = (int)(i); j >= (int)(1); j--) {
      f[j] = (f[j] + f[j - 1]) % mo;
      f[j - 1] = 1ll * f[j - 1] * (mo + 1 - i) % mo;
    }
  int ans = 0;
  for (int i = (int)(0); i <= (int)(K); i++)
    ans = (ans + 1ll * f[i] * v[i]) % mo;
  ans = 1ll * ans * inv[K] % mo;
  printf("%d\n", ans);
}