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 Max_K(205);
const int MOD(1000000007);
constexpr int Mult(int a, int b) { return a * 1LL * b % MOD; }
constexpr int Add(int a, int b) { return a + b >= MOD ? a + b - MOD : a + b; }
constexpr int Sub(int a, int b) { return a - b < 0 ? a - b + MOD : a - b; }
void exgcd(int a, int b, int &x, int &y) {
  if (b == 0)
    x = 1, y = 0;
  else
    exgcd(b, a % b, y, x), y -= x * (a / b);
}
inline int inverse(int a) {
  int invx, invy;
  exgcd(a, MOD, invx, invy);
  return (invx % MOD + MOD) % MOD;
}
struct num {
  num(int _a = 0, int _b = 0) : a(_a), b(_b) {}
  int a, b;
};
inline num operator+(const num &x, const num &y) {
  return num(Add(x.a, y.a), Add(x.b, y.b));
}
inline num operator-(const num &x, const num &y) {
  return num(Sub(x.a, y.a), Sub(x.b, y.b));
}
inline num operator*(const num &x, const num &y) {
  return num(Add(Mult(x.a, y.a), Mult(5, Mult(x.b, y.b))),
             Add(Mult(x.a, y.b), Mult(x.b, y.a)));
}
inline num inverse(const num &x) {
  int t = inverse(Sub(Mult(x.a, x.a), Mult(5, Mult(x.b, x.b))));
  num cnm = num(Mult(x.a, t), Mult(Sub(0, x.b), t)) * x;
  return num(Mult(x.a, t), Mult(Sub(0, x.b), t));
}
inline num operator/(const num &x, const num &y) { return x * inverse(y); }
num power(num a, long long int n) {
  num Ret(1, 0);
  while (n) {
    if (n & 1LL) Ret = Ret * a;
    a = a * a, n >>= 1LL;
  }
  return Ret;
}
int K, P[Max_K], C[Max_K][Max_K];
long long int L, R;
num js(const num &x, long long int n) {
  if (x.a == 1 && x.b == 0) return num(static_cast<int>((n + 1LL) % MOD), 0);
  return (power(x, n + 1LL) - num(1, 0)) / (x - num(1, 0));
}
int work(long long int n) {
  num a(inverse(2), inverse(2)), b(inverse(2), Sub(0, inverse(2))), Ans;
  for (int k = 0; k <= K; ++k) {
    num Ret;
    for (int j = 0; j <= k; ++j) {
      num temp(C[k][j], 0);
      if ((k - j) & 1) temp = num() - temp;
      temp = temp * js(power(a, j) * power(b, k - j), n);
      Ret = Ret + temp;
    }
    Ans = Ans + Ret * num(P[k], 0) / power(num(0, 1), k);
  }
  return Ans.a;
}
int main() {
  scanf("%d%I64d%I64d", &K, &L, &R);
  C[0][0] = 1;
  for (int i = 1; i <= K; ++i) {
    C[i][0] = C[i][i] = 1;
    for (int j = 1; j < i; ++j) C[i][j] = Add(C[i - 1][j - 1], C[i - 1][j]);
  }
  P[0] = 1;
  for (int i = 1; i <= K; ++i) P[0] = Mult(P[0], inverse(i));
  for (int i = 0; i <= K - 1; ++i)
    for (int x = i + 1; x >= 0; --x) {
      P[x] = Mult(P[x], Sub(0, i));
      if (x - 1 >= 0) P[x] = Add(P[x], P[x - 1]);
    }
  printf("%d", Sub(work(R + 2LL), work(L + 1LL)));
  return 0;
}