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 N = 1e5 + 5, MOD = 1e9 + 7, K = 505;
inline int add(int a, const int &b = 1) {
  if ((a += b) >= MOD) a -= MOD;
  return a;
}
inline int sub(int a, const int &b = 1) {
  if ((a -= b) < 0) a += MOD;
  return a;
}
inline int mul(const int &a, const int &b) { return 1ll * a * b % MOD; }
inline int sqr(const int &a) { return mul(a, a); }
inline int &inc(int &a, const int &b) { return a = add(a, b); }
inline int &dec(int &a, const int &b) { return a = sub(a, b); }
inline int &pro(int &a, const int &b) { return a = mul(a, b); }
inline int qpow(int a, int b) {
  int c = 1;
  for (; b; b >>= 1, pro(a, a))
    if (b & 1) pro(c, a);
  return c;
}
int n, T, m, k, S[K][K], C[K][K], M, fac[K], inv[K], invc[K];
long long l, r;
struct par {
  int x, y;
  inline par(int _x = 0, int _y = 0) {
    x = _x;
    y = _y;
  }
  inline par inv() const {
    const int v = qpow(sub(sqr(x), mul(sqr(y), M)), MOD - 2);
    return par(mul(x, v), mul(sub(0, y), v));
  }
  inline par operator+(const par &t) const {
    return par(add(x, t.x), add(y, t.y));
  }
  inline par operator-(const par &t) const {
    return par(sub(x, t.x), sub(y, t.y));
  }
  inline par friend operator-(const int &a, const par &b) {
    return par(sub(a, b.x), sub(0, b.y));
  }
  inline par operator*(const par &t) const {
    return par(add(mul(x, t.x), mul(mul(y, t.y), M)),
               add(mul(x, t.y), mul(y, t.x)));
  }
  inline par operator/(const par &t) const { return *this * t.inv(); }
  inline par &operator*=(const par &t) { return *this = *this * t; }
  inline par operator^(long long b) {
    par c(1, 0), a = *this;
    for (; b; b >>= 1, a *= a)
      if (b & 1) c *= a;
    return c;
  }
  inline void out() { printf("%d+%dv%d\n", x, y, M); }
} A, B, alpha, beta;
inline int solve(const long long &l, const long long &r, const int &k) {
  int ret = 0;
  for (int i = 0; i <= k; i++) {
    int cur = 0;
    for (int j = 0; j <= i; j++) {
      par q = (alpha ^ j) * (beta ^ (i - j));
      inc(cur,
          mul(((A ^ j) * (B ^ (i - j)) *
               ((q.x == 1 && q.y == 0) ? sub(r % MOD, (l - 1) % MOD)
                                       : ((q ^ l) - (q ^ (r + 1))) / (1 - q)))
                  .x,
              C[i][j]));
    }
    pro(cur, S[k][i]);
    k - i & 1 ? dec(ret, cur) : inc(ret, cur);
  }
  return mul(ret, invc[k]);
}
int main() {
  S[0][0] = C[0][0] = 1;
  for (int i = 1; i < K; i++)
    for (int j = 1; j <= i; j++)
      S[i][j] = add(S[i - 1][j - 1], mul(i - 1, S[i - 1][j]));
  for (int i = 1; i < K; i++)
    for (int j = 0; j <= i; j++)
      C[i][j] = j ? add(C[i - 1][j - 1], C[i - 1][j]) : 1;
  fac[0] = fac[1] = inv[0] = inv[1] = invc[0] = invc[1] = 1;
  for (int i = 2; i < K; i++)
    fac[i] = mul(fac[i - 1], i), inv[i] = mul(MOD - MOD / i, inv[MOD % i]),
    invc[i] = mul(invc[i - 1], inv[i]);
  T = 1, m = 2;
  if (m == 2) {
    A = par(0, inv[5]);
    B = par(0, sub(0, inv[5]));
    alpha = par(inv[2], inv[2]);
    beta = par(inv[2], sub(0, inv[2]));
    M = 5;
  } else {
    A = par(inv[2], sub(0, inv[6]));
    B = par(inv[2], inv[6]);
    alpha = par(2, sub(0, 1));
    beta = par(2, 1);
    M = 3;
  }
  while (T--) {
    scanf("%d%I64d%I64d\n", &k, &l, &r);
    printf("%d\n",
           m ^ 2 ? solve(l + 1 >> 1, r >> 1, k) : solve(l + 2, r + 2, k));
  }
  return 0;
}