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 K = 205;
const long long MOD = (long long)1e9 + 7;
long long add(long long x, long long y) {
  x += y;
  if (x >= MOD) return x - MOD;
  return x;
}
long long sub(long long x, long long y) {
  x -= y;
  if (x < 0) return x + MOD;
  return x;
}
long long mult(long long x, long long y) { return (x * y) % MOD; }
long long bin_pow(long long x, long long p) {
  if (p == 0) return 1;
  if (p == 2 || (p & 1)) return mult(x, bin_pow(x, p - 1));
  return bin_pow(bin_pow(x, p / 2), 2);
}
long long rev(long long x) { return bin_pow(x, MOD - 2); }
struct Num {
  long long a, b;
  Num() : a(), b() {}
  Num(long long _a, long long _b) : a(_a), b(_b) {}
  Num operator+(const Num &A) const { return Num(add(a, A.a), add(b, A.b)); }
  Num operator-(const Num &A) const { return Num(sub(a, A.a), sub(b, A.b)); }
  Num operator*(const Num &A) const {
    return Num((a * A.a + 5 * b * A.b) % MOD, (a * A.b + b * A.a) % MOD);
  }
  Num operator/(const Num &A) const {
    long long Q = sub(mult(A.a, A.a), mult(5 * A.b, A.b));
    if (Q == 0) throw;
    Q = rev(Q);
    return Num(mult(Q, sub(mult(a, A.a), mult(5 * b, A.b))),
               mult(Q, sub(mult(b, A.a), mult(a, A.b))));
  }
};
Num bin_pow(Num A, long long p) {
  if (p == 0) return Num(1, 0);
  if (p == 2 || (p & 1)) return A * bin_pow(A, p - 1);
  return bin_pow(bin_pow(A, p / 2), 2);
}
long long C[K][K];
long long A[K][K];
void precalc() {
  for (int i = 0; i < K; i++) C[i][0] = C[i][i] = 1;
  for (int i = 1; i < K; i++)
    for (int j = 1; j < i; j++) C[i][j] = add(C[i - 1][j], C[i - 1][j - 1]);
  A[0][0] = 1;
  for (int i = 0; i < K - 1; i++) {
    for (int j = 0; j <= i; j++) {
      A[i + 1][j] = sub(A[i + 1][j], mult(i, A[i][j]));
      A[i + 1][j + 1] = add(A[i + 1][j + 1], A[i][j]);
    }
  }
  return;
}
Num calcGeom(Num A, long long n) {
  if (A.a == 1 && A.b == 0) {
    return Num(n % MOD, 0);
  }
  return (bin_pow(A, n) - Num(1, 0)) / (A - Num(1, 0));
}
long long solve(int k, long long r) {
  Num P1 = Num(rev(2), rev(2)), P2 = Num(rev(2), sub(0, rev(2)));
  Num res = Num();
  for (int m = 0; m <= k; m++) {
    Num cur = Num();
    for (int l = 0; l <= m; l++) {
      Num x =
          calcGeom(bin_pow(P2, l) * bin_pow(P1, m - l), r) * Num(C[m][l], 0);
      if (l & 1)
        cur = cur - x;
      else
        cur = cur + x;
    }
    cur = cur / bin_pow(Num(0, 1), m);
    res = res + cur * Num(A[k][m], 0);
  }
  if (res.b != 0) throw;
  return res.a;
}
int main() {
  precalc();
  int k;
  long long l, r;
  scanf("%d%lld%lld", &k, &l, &r);
  l += 2;
  r += 3;
  long long ans = sub(solve(k, r), solve(k, l));
  for (int i = 1; i <= k; i++) ans = mult(ans, rev(i));
  printf("%lld\n", ans);
  return 0;
}