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 maxN = 205, mod = 1e9 + 7;
inline int ADD(int x, int y) { return x + y >= mod ? x + y - mod : x + y; }
inline int SUB(int x, int y) { return x - y < 0 ? x - y + mod : x - y; }
inline int mpow(int a, long long x) {
  int ans = 1;
  while (x) {
    if (x & 1) ans = 1ll * ans * a % mod;
    a = 1ll * a * a % mod;
    x >>= 1;
  }
  return ans;
}
struct Num {
  int a, b;
  Num(int X = 0, int Y = 0) {
    a = X;
    b = Y;
  }
};
Num operator+(Num a, Num b) { return Num(ADD(a.a, b.a), ADD(a.b, b.b)); }
Num operator-(Num a, Num b) { return Num(SUB(a.a, b.a), SUB(a.b, b.b)); }
Num operator*(Num a, int p) {
  return Num(1ll * a.a * p % mod, 1ll * a.b * p % mod);
}
Num operator*(Num a, Num b) {
  return Num(ADD(1ll * a.a * b.a % mod, 5ll * a.b * b.b % mod),
             ADD(1ll * a.a * b.b % mod, 1ll * a.b * b.a % mod));
}
Num operator/(Num a, Num b) {
  return a * Num(b.a, mod - b.b) *
         mpow(SUB(1ll * b.a * b.a % mod, 5ll * b.b * b.b % mod), mod - 2);
}
int k, cnt;
int C[maxN + 1][maxN + 1];
int coef[maxN + 1];
long long L, R;
inline int binom(int n, int m) { return C[n][m]; }
inline Num Pow(Num a, long long x) {
  Num ans(1, 0);
  while (x) {
    if (x & 1) ans = ans * a;
    a = a * a;
    x >>= 1;
  }
  return ans;
}
inline int solve(long long n) {
  Num A, B, C, pw(1, 0);
  A.a = B.a = (mod + 1) / 2;
  A.b = (mod + 1) / 2, B.b = mod - (mod + 1) / 2;
  C.a = 0, C.b = mpow(5, mod - 2);
  int ans = 0;
  for (int i = 0; i <= k; i++) {
    Num s(0, 0);
    for (int j = 0; j <= i; j++) {
      Num cur = Pow(A, j) * Pow(B, i - j);
      Num t;
      if (cur.a == 1 && cur.b == 0)
        t = Num((n + 1) % mod, 0);
      else
        t = ((Num(1, 0) - Pow(cur, n + 1)) / (Num(1, 0) - cur));
      t = t * binom(i, j);
      if (i - j & 1)
        s = s - t;
      else
        s = s + t;
    }
    s = s * pw * coef[i];
    ans = ADD(ans, s.a);
    pw = pw * C;
  }
  return ans;
}
int main() {
  scanf("%d %lld %lld", &k, &L, &R);
  C[0][0] = 1;
  for (int i = 1; i <= k; i++) {
    C[i][0] = 1;
    for (int j = 1; j <= i; j++) C[i][j] = ADD(C[i - 1][j], C[i - 1][j - 1]);
  }
  coef[0] = 1;
  for (int i = 0; i < k; i++)
    for (int j = i; j >= 0; j--) {
      coef[j + 1] = ADD(coef[j + 1], coef[j]);
      coef[j] = 1ll * coef[j] * (mod - i) % mod;
    }
  int s = 1;
  for (int i = 1; i <= k; i++) s = 1ll * s * i % mod;
  s = mpow(s, mod - 2);
  for (int i = 0; i <= k; i++) coef[i] = 1ll * coef[i] * s % mod;
  printf("%d\n", SUB(solve(R + 2), solve(L + 1)));
  return 0;
}