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;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXK = 200;
const int MOD = 1000000007;
typedef struct F {
  int a, b;
  F(int a, int b) : a(a), b(b) {}
} F;
F operator+(const F &p, const F &q) {
  int a = p.a + q.a, b = p.b + q.b;
  if (a >= MOD) a -= MOD;
  if (b >= MOD) b -= MOD;
  return F(a, b);
}
F operator*(const F &p, const F &q) {
  return F(((long long)p.a * q.a + (long long)p.b * q.b * 5) % MOD,
           ((long long)p.a * q.b + (long long)p.b * q.a) % MOD);
}
F mypow(F p, long long n) {
  F ret(1, 0);
  while (true) {
    if (n & 1) ret = ret * p;
    if ((n >>= 1) == 0) return ret;
    p = p * p;
  }
}
F mysumpow(F p, long long n) {
  F ret(0, 0), q(1, 0), pp = p;
  int nn = n;
  ++n;
  while (true) {
    if (n & 1) ret = ret * p + q;
    if ((n >>= 1) == 0) break;
    q = q + p * q;
    p = p * p;
  }
  return ret;
}
int k;
long long l, r;
int a[MAXK + 1];
int fact[MAXK + 1];
int inv[MAXK + 1];
int ifact[MAXK + 1];
int C[MAXK + 1][MAXK + 1];
int sumfibpow(long long n, int i) {
  F ret(0, 0);
  F p(inv[2], inv[2]), q(inv[2], MOD - inv[2]);
  for (int j = (0); j <= (i); ++j) {
    int coeff = C[i][j];
    if ((i - j) % 2 != 0) coeff = coeff == 0 ? 0 : MOD - coeff;
    F r(mypow(p, j) * mypow(q, i - j));
    F s = mysumpow(r, n);
    F cur = F(coeff, 0) * s;
    ret = ret + cur;
  }
  ret = ret * mypow(F(0, inv[5]), i);
  assert(ret.b == 0);
  return ret.a;
}
int calc(long long r) {
  int ret = 0;
  for (int i = (0); i <= (k); ++i) {
    int cur = sumfibpow(r + 2, i) - 1;
    ret = (ret + (long long)cur * a[i]) % MOD;
  }
  return ret;
}
void run() {
  scanf("%d%lld%lld", &k, &l, &r);
  fact[0] = 1;
  for (int i = (1); i <= (MAXK); ++i)
    fact[i] = (long long)fact[i - 1] * i % MOD;
  inv[1] = 1;
  for (int i = (2); i <= (MAXK); ++i)
    inv[i] = (long long)(MOD - (MOD / i)) * inv[MOD % i] % MOD;
  ifact[0] = 1;
  for (int i = (1); i <= (MAXK); ++i)
    ifact[i] = (long long)ifact[i - 1] * inv[i] % MOD;
  for (int i = (0); i <= (MAXK); ++i) {
    C[i][0] = C[i][i] = 1;
    for (int j = (1); j < (i); ++j)
      if ((C[i][j] = C[i - 1][j - 1] + C[i - 1][j]) >= MOD) C[i][j] -= MOD;
  }
  a[0] = ifact[k];
  for (int i = (0); i < (k); ++i) {
    int t = i == 0 ? 0 : MOD - i;
    a[i + 1] = 0;
    for (int j = i + 1; j > 0; --j)
      a[j] = (a[j - 1] + (long long)t * a[j]) % MOD;
    a[0] = (long long)t * a[0] % MOD;
  }
  int ret = calc(r) - calc(l - 1);
  if (ret < 0) ret += MOD;
  printf("%d\n", ret);
}
int main() {
  run();
  return 0;
}