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 MOD = (int)1e9 + 7;
const int INF = (int)1e9;
const long long LINF = (long long)1e18;
const long double PI = acos((long double)-1);
const long double EPS = 1e-9;
inline long long gcd(long long a, long long b) {
  long long r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
inline long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
inline long long fpow(long long n, long long k, int p = MOD) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
template <class T>
inline int chkmin(T& a, const T& val) {
  return val < a ? a = val, 1 : 0;
}
template <class T>
inline int chkmax(T& a, const T& val) {
  return a < val ? a = val, 1 : 0;
}
inline long long isqrt(long long k) {
  long long r = sqrt(k) + 1;
  while (r * r > k) r--;
  return r;
}
inline long long icbrt(long long k) {
  long long r = cbrt(k) + 1;
  while (r * r * r > k) r--;
  return r;
}
inline void addmod(int& a, int val, int p = MOD) {
  if ((a = (a + val)) >= p) a -= p;
}
inline void submod(int& a, int val, int p = MOD) {
  if ((a = (a - val)) < 0) a += p;
}
inline int mult(int a, int b, int p = MOD) { return (long long)a * b % p; }
inline int inv(int a, int p = MOD) { return fpow(a, p - 2, p); }
struct Num {
  int a, b;
  Num() : a(0), b(0) {}
  Num(int a, int b) : a(a), b(b) {}
  Num(const Num& rhs) : a(rhs.a), b(rhs.b) {}
  Num operator+(const Num& rhs) const {
    Num res;
    res.a = a + rhs.a;
    if (res.a >= MOD) res.a -= MOD;
    res.b = b + rhs.b;
    if (res.b >= MOD) res.b -= MOD;
    return res;
  }
  Num operator-(const Num& rhs) const {
    Num res;
    res.a = a - rhs.a;
    if (res.a < 0) res.a += MOD;
    res.b = b - rhs.b;
    if (res.b < 0) res.b += MOD;
    return res;
  }
  Num operator*(const Num& rhs) const {
    Num res;
    res.a = ((long long)a * rhs.a + (long long)5 * b * rhs.b) % MOD;
    res.b = ((long long)a * rhs.b + (long long)b * rhs.a) % MOD;
    return res;
  }
  Num operator^(long long k) {
    if (!k) return Num(1, 0);
    Num tmp = Num(a, b), res = Num(a, b);
    k--;
    while (k) {
      if (k & 1) res = res * tmp;
      tmp = tmp * tmp;
      k >>= 1;
    }
    return res;
  }
  friend Num geometricseries(Num a, long long k) {
    if (!k) return Num(1, 0);
    if (k == 1) return a;
    vector<int> bit;
    while (k) {
      bit.push_back(k & 1);
      k >>= 1;
    }
    Num res = a, tmp = a;
    for (int i = bit.size() - 2; i >= 0; i--) {
      res = res + (res * tmp);
      tmp = tmp * tmp;
      if (bit[i] & 1) {
        tmp = tmp * a;
        res = res + tmp;
      }
    }
    return res;
  }
};
const int maxk = 200 + 10;
int k;
long long l, r;
int c[maxk][maxk];
int s[maxk][maxk];
int fac[maxk];
Num n1[maxk];
Num n2[maxk];
int calc(long long x) {
  int res = 0;
  for (int i = (1); i < (k + 1); i++) {
    for (int j = (0); j < (i + 1); j++) {
      Num tmp = n1[j] * n2[i - j];
      tmp = geometricseries(tmp, x);
      if ((i - j) & 1) {
        tmp.a = (MOD - tmp.a) % MOD;
        tmp.b = (MOD - tmp.b) % MOD;
      }
      tmp = tmp * Num(c[j][i], 0);
      if (i & 1) {
        addmod(res, mult(s[k][i], mult(tmp.b, inv(fpow(5, i >> 1)))));
      } else {
        addmod(res, mult(s[k][i], mult(tmp.a, inv(fpow(5, i >> 1)))));
      }
    }
  }
  return res;
}
void solve() {
  for (int i = (0); i < (maxk); i++) c[0][i] = 1;
  for (int i = (1); i < (maxk); i++)
    for (int j = (1); j < (maxk); j++)
      c[i][j] = (c[i][j - 1] + c[i - 1][j - 1]) % MOD;
  s[0][0] = 1;
  for (int i = (1); i < (maxk); i++)
    for (int j = (1); j < (maxk); j++) {
      submod(s[i][j], mult(i - 1, s[i - 1][j]));
      addmod(s[i][j], s[i - 1][j - 1]);
    }
  fac[0] = 1;
  for (int i = (1); i < (maxk); i++) fac[i] = mult(fac[i - 1], i);
  n1[0] = n2[0] = Num(1, 0);
  n1[1] = Num(inv(2), inv(2)), n2[1] = Num(inv(2), MOD - inv(2));
  for (int i = (1); i < (maxk); i++)
    n1[i] = n1[i - 1] * n1[1], n2[i] = n2[i - 1] * n2[1];
  cin >> k >> l >> r;
  int ans = calc(r + 2);
  submod(ans, calc(l + 1));
  ans = mult(ans, inv(fac[k]));
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}