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;
inline long long read() {
  register long long res = 0;
  register char c = getchar(), f = 1;
  while (c < 48 || c > 57) {
    if (c == '-') f = 0;
    c = getchar();
  }
  while (c >= 48 && c <= 57)
    res = (res << 3) + (res << 1) + (c & 15), c = getchar();
  return f ? res : -res;
}
inline void write(int x) {
  register char c[20], len = 0;
  if (x < 0) putchar('-'), x = -x;
  if (!x) putchar('0');
  while (x) c[++len] = x % 10 ^ 48, x /= 10;
  while (len) putchar(c[len--]);
}
const int mod = 1e9 + 7;
struct M {
  int x;
  inline M(int a = 0) : x((a + mod) % mod) {}
  inline M operator+(const M& p) const {
    return x + p.x >= mod ? x + p.x - mod : x + p.x;
  }
  inline M operator-() const { return x ? mod - x : 0; }
  inline M operator-(const M& p) const {
    return x - p.x < 0 ? x - p.x + mod : x - p.x;
  }
  inline M operator*(const M& p) const { return (long long)x * p.x % mod; }
  inline void operator+=(const M& p) { *this = *this + p; }
  inline bool operator==(const int& p) const { return x == p; }
};
inline void write(M x) { write(x.x); }
template <class T>
inline T qpow(T x, long long y) {
  T res(1);
  for (; y; y >>= 1) res = y & 1 ? res * x : res, x = x * x;
  return res;
}
template <int T>
struct cp {
  M r, i;
  inline cp(int a) : r(a), i(0) {}
  inline cp(M a = 0, M b = 0) : r(a), i(b) {}
  inline cp operator+(const cp& p) const { return cp(r + p.r, i + p.i); }
  inline cp operator-(const cp& p) const { return cp(r - p.r, i - p.i); }
  inline cp operator*(const cp& p) const {
    return cp(r * p.r + i * p.i * T, r * p.i + i * p.r);
  }
  inline cp operator/(const cp& p) const {
    return cp(r * p.r - i * p.i * T, i * p.r - r * p.i) *
           qpow(p.r * p.r - p.i * p.i * T, mod - 2);
  }
  inline void operator+=(const cp& p) { *this = *this + p; }
};
const int N = 210;
long long l, r;
int k;
M fac[N], inf[N], s[N][N];
inline M C(int n, int m) {
  if (n < m) return 0;
  return fac[n] * inf[m] * inf[n - m];
}
template <class T>
T solve(T x1, T x2, T c1, T c2) {
  T res(0);
  for (int i = 1; i <= k; ++i) {
    T now(0);
    for (int j = 0; j <= i; ++j) {
      T tmp = qpow(x1, j) * qpow(x2, i - j), sum;
      if (tmp.r == 1 && tmp.i == 0)
        sum = (r - l + 1) % mod;
      else
        sum = (qpow(tmp, r + 1) - qpow(tmp, l)) / (tmp - 1);
      now += qpow(c1, j) * qpow(c2, i - j) * sum * C(i, j);
    }
    res += now * s[k][i];
  }
  return res * inf[k];
}
int main() {
  k = read(), l = read() + 1, r = read() + 1;
  fac[0] = 1;
  for (int i = 1; i <= k; ++i) fac[i] = fac[i - 1] * i;
  inf[k] = qpow(fac[k], mod - 2);
  for (int i = k - 1; ~i; --i) inf[i] = inf[i + 1] * (i + 1);
  s[1][1] = 1;
  for (int i = 1; i < k; ++i) {
    s[i + 1][1] = -s[i][1] * i;
    for (int j = 1; j <= k; ++j) s[i + 1][j] = s[i][j - 1] - s[i][j] * i;
  }
  write(solve(cp<5>(1, 1) / 2, cp<5>(1, -1) / 2, cp<5>(5, 1) / 10,
              cp<5>(5, -1) / 10)
            .r),
      putchar('\n');
}