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 = 1e9 + 7, inv10 = 700000005, inv2 = 500000004, inv6 = 166666668;
long long S[1100][1100], C[1100][1100], fac[1100], invfac[1100];
int type;
long long pw(long long a, long long b) {
  long long r = 1;
  for (a %= mod; b; b >>= 1, a = a * a % mod)
    if (b & 1) r = r * a % mod;
  return r;
}
long long inv(long long n) { return pw(n, mod - 2); }
struct Z_R {
  long long a, b, nek;
};
const Z_R f_a = (Z_R){inv10, inv2, 5}, f_x0 = (Z_R){inv2, inv2, 5},
          f_b = (Z_R){-inv10, inv2, 5}, f_x1 = (Z_R){-inv2, inv2, 5},
          g_a = (Z_R){inv6, inv2, 3}, g_x0 = (Z_R){1, 2, 3},
          g_b = (Z_R){-inv6, inv2, 3}, g_x1 = (Z_R){-1, 2, 3};
Z_R operator+(Z_R x, Z_R y) {
  return (Z_R){(x.a + y.a) % mod, (x.b + y.b) % mod, x.nek};
}
Z_R operator-(Z_R x, Z_R y) {
  return (Z_R){(x.a - y.a) % mod, (x.b - y.b) % mod, x.nek};
}
Z_R operator*(Z_R x, Z_R y) {
  return (Z_R){(x.a * y.b % mod + x.b * y.a % mod) % mod,
               (x.nek * x.a * y.a % mod + x.b * y.b % mod) % mod, x.nek};
}
Z_R inv(Z_R x) {
  long long a = x.a, b = x.b, dn = inv(x.nek * a * a % mod - b * b % mod);
  return (Z_R){a * dn % mod, -b * dn % mod};
}
Z_R pw(Z_R a, long long b) {
  Z_R r = (Z_R){0, 1, a.nek};
  for (; b; b >>= 1, a = a * a)
    if (b & 1) r = r * a;
  return r;
}
Z_R getsum(Z_R a, long long n) {
  if (n <= 0) return (Z_R){0, 0, a.nek};
  if (a.a == 0 && a.b == 1) return (Z_R){0, n % mod, a.nek};
  return (pw(a, n + 1) - a) * inv(a - (Z_R){0, 1, a.nek});
}
long long get_f_sum(long long l, long long r, long long k) {
  if (k == 0) return (r - l + 1) % mod;
  Z_R res = (Z_R){0, 0, 5};
  for (int j = 0; j <= k; ++j) {
    Z_R tmp = getsum(pw(f_x0, j) * pw(f_x1, k - j), r);
    if (l > 1) {
      tmp = tmp - getsum(pw(f_x0, j) * pw(f_x1, k - j), l - 1);
    }
    res = res + (Z_R){0, C[k][j], 5} * pw(f_a, j) * pw(f_b, k - j) * tmp;
  }
  return res.b;
}
long long get_h_sum(long long n, long long k) {
  if (n <= 0) return 0;
  if (k == 0) return n % mod;
  Z_R res = (Z_R){0, 0, 3};
  for (int j = 0; j <= k; ++j) {
    res = res + (Z_R){0, C[k][j], 3} * pw(g_a, j) * pw(g_b, k - j) *
                    getsum(pw(g_x0, j) * pw(g_x1, k - j), n);
  }
  return res.b;
}
long long get_g_sum(long long l, long long r, long long k) {
  return get_h_sum(r / 2, k) - get_h_sum((l - 1) / 2, k);
}
void init() {
  int n = 1000;
  fac[0] = 1, invfac[0] = 1;
  for (int i = 1; i <= n; ++i) fac[i] = fac[i - 1] * i % mod;
  invfac[n] = pw(fac[n], mod - 2);
  for (int i = n - 1; i; --i) invfac[i] = invfac[i + 1] * (i + 1) % mod;
  C[0][0] = S[0][0] = 1;
  for (int i = 1; (C[i][0] = 1), i <= n; ++i)
    for (int j = 1; j <= i; ++j)
      S[i][j] = ((i - 1) * S[i - 1][j] + S[i - 1][j - 1]) % mod,
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;
}
void runprog() {
  long long l, r, k, ans = 0;
  scanf("%lld%lld%lld", &k, &l, &r);
  ++l, ++r;
  for (int j = 0; j <= k; ++j)
    if (type == 2)
      ans =
          (ans + get_f_sum(l, r, j) * S[k][j] * ((k - j) & 1 ? -1 : 1) % mod) %
          mod;
    else
      ans =
          (ans + get_g_sum(l, r, j) * S[k][j] * ((k - j) & 1 ? -1 : 1) % mod) %
          mod;
  printf("%lld\n", (ans % mod * invfac[k] % mod + mod) % mod);
}
int main() {
  init();
  type = 2;
  runprog();
}