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;
struct magic_nr {
  long long a, b;
  magic_nr() {}
  magic_nr(long long a, long long b) { this->a = a, this->b = b; }
};
long long K, l, r, comb[210][210], coef[210], aux[210];
magic_nr r1, r2, sr5;
long long fpow(long long nr, long long put) {
  long long res = 1;
  nr %= 1000000007;
  while (put) {
    if (put & 1) res = (res * nr) % 1000000007;
    nr = (nr * nr) % 1000000007;
    put >>= 1;
  }
  return res;
}
long long inv(long long nr) { return fpow(nr, 1000000007 - 2); }
magic_nr neg(magic_nr x) {
  x.a = -x.a, x.b = -x.b;
  return x;
}
magic_nr sum(magic_nr x, magic_nr y) {
  x.a = (x.a + y.a) % 1000000007;
  x.b = (x.b + y.b) % 1000000007;
  return x;
}
magic_nr prodc(long long c, magic_nr x) {
  c %= 1000000007;
  x.a = (c * x.a) % 1000000007;
  x.b = (c * x.b) % 1000000007;
  return x;
}
magic_nr prod(magic_nr x, magic_nr y) {
  magic_nr res;
  res.a =
      (x.a * y.a + (5 * (x.b * y.b) % 1000000007) % 1000000007) % 1000000007;
  res.b = (x.a * y.b + x.b * y.a) % 1000000007;
  return res;
}
magic_nr inv(magic_nr x) {
  magic_nr res;
  long long aux =
      (x.a * x.a - (5 * (x.b * x.b) % 1000000007) % 1000000007) % 1000000007;
  if (aux < 0) aux += 1000000007;
  res.a = x.a, res.b = (1000000007 - x.b) % 1000000007;
  aux = inv(aux);
  res = prodc(aux, res);
  return res;
}
magic_nr fpow(magic_nr x, long long put) {
  magic_nr res(1, 0);
  while (put) {
    if (put & 1) res = prod(res, x);
    x = prod(x, x);
    put >>= 1;
  }
  return res;
}
long long power_sum(long long r, long long put) {
  long long i;
  magic_nr f, s, produs, aux, res(0, 0);
  for (i = 0; i <= put; i++) {
    f = fpow(r1, i), s = fpow(r2, put - i);
    produs = prod(f, s);
    aux = produs;
    if ((produs.a - 1) % 1000000007 == 0 && produs.b == 0)
      produs = magic_nr((r + 1) % 1000000007, 0);
    else {
      produs = sum(fpow(produs, r + 1), magic_nr(-1, 0));
      produs = prod(produs, inv(sum(aux, magic_nr(-1, 0))));
    }
    if ((put - i) % 2)
      produs = prodc(-comb[put][i], produs);
    else
      produs = prodc(comb[put][i], produs);
    res = sum(res, produs);
  }
  res = prod(res, fpow(sr5, put));
  res = prodc(fpow(inv(5), put), res);
  if (res.b != 0) cout << "wtf\n";
  return res.a;
}
int main() {
  cin >> K >> l >> r;
  l += 2, r += 2;
  r1 = magic_nr(inv(2), inv(2));
  r2 = magic_nr(inv(2), 1000000007 - inv(2));
  sr5 = magic_nr(0, 1);
  long long i, j;
  comb[0][0] = 1;
  for (i = 1; i <= K; i++) {
    comb[i][0] = 1;
    for (j = 1; j <= i; j++)
      comb[i][j] = (comb[i - 1][j] + comb[i - 1][j - 1]) % 1000000007;
  }
  coef[0] = 1;
  for (i = 1; i <= K; i++) {
    for (j = 0; j <= i; j++) {
      aux[j] = -(i - 1) * coef[j];
      if (j > 0) aux[j] += coef[j - 1];
      aux[j] %= 1000000007;
      if (aux[j] < 0) aux[j] += 1000000007;
    }
    for (j = 0; j <= i; j++) coef[j] = aux[j];
  }
  long long res = 0;
  for (i = 1; i <= K; i++)
    res =
        (res + coef[i] * (power_sum(r, i) - power_sum(l - 1, i))) % 1000000007;
  res %= 1000000007;
  if (res < 0) res += 1000000007;
  for (i = 1; i <= K; i++) res = (res * inv(i)) % 1000000007;
  cout << res << "\n";
  return 0;
}