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;
int re, k, stir[222][222], fac[222], c[222][222];
long long l, r;
map<long long, int> hs;
struct wuli {
  int coef[2];
};
map<long long, wuli> ha;
wuli qq, one, ge;
wuli operator+(wuli a, wuli b) {
  wuli ret;
  for (int i = 0; i < 2; i++) ret.coef[i] = (a.coef[i] + b.coef[i]) % mod;
  return ret;
}
wuli operator-(wuli a, wuli b) {
  wuli ret;
  for (int i = 0; i < 2; i++) ret.coef[i] = (a.coef[i] - b.coef[i] + mod) % mod;
  return ret;
}
wuli operator*(wuli a, wuli b) {
  wuli ret;
  int i, j;
  for (i = 0; i < 2; i++) ret.coef[i] = 0;
  for (i = 0; i < 2; i++) {
    for (j = 0; j < 2; j++) {
      int vl = (int)((long long)a.coef[i] * (long long)b.coef[j] % mod);
      if (i == 1 && j == 1) vl = (int)((long long)vl * (long long)5 % mod);
      ret.coef[(i + j) % 2] = (ret.coef[(i + j) % 2] + vl) % mod;
    }
  }
  return ret;
}
int power(int a, int n, int mod) {
  int ret;
  if (n == 0) return 1;
  ret = power(a, n / 2, mod);
  ret = (int)((long long)ret * (long long)ret % mod);
  if (n % 2) ret = (int)((long long)ret * (long long)a % mod);
  return ret;
}
wuli operator/(wuli a, wuli b) {
  wuli ret, bb;
  int vs, vl;
  bb.coef[0] = b.coef[0];
  bb.coef[1] = (mod - b.coef[1]) % mod;
  vs = (int)((long long)b.coef[0] * (long long)b.coef[0] % mod);
  vl = (int)((long long)b.coef[1] * (long long)b.coef[1] % mod);
  vl = (int)((long long)vl * (long long)5 % mod);
  vs = (vs - vl + mod) % mod;
  vs = power(vs, mod - 2, mod);
  bb.coef[0] = (int)((long long)bb.coef[0] * (long long)vs % mod);
  bb.coef[1] = (int)((long long)bb.coef[1] * (long long)vs % mod);
  ret = a * bb;
  return ret;
}
wuli compute(wuli a, long long x) {
  wuli ret;
  if (x == 0) {
    ret.coef[0] = 1;
    ret.coef[1] = 0;
    return ret;
  }
  ret = compute(a, x / 2);
  ret = ret * ret;
  if (x % 2) ret = ret * a;
  return ret;
}
int compute(long long x, int k) {
  int i, j, s, p, q;
  long long id;
  wuli res, now, nw, awp;
  int vm = power(5, k / 2, mod);
  awp = one;
  if (k % 2) awp = ge;
  for (j = 0; j < 2; j++)
    awp.coef[j] = (int)((long long)awp.coef[j] * (long long)vm % mod);
  res.coef[0] = res.coef[1] = 0;
  for (i = 0; i <= k; i++) {
    if (k - 2 * i == 0 && i % 2 == 0) {
      now.coef[1] = 0;
      int vl = (int)((x + 1) % mod);
      now.coef[0] = (int)((long long)c[k][i] * (long long)vl % mod);
      now.coef[0] = (int)((long long)now.coef[0] *
                          (long long)power(vm, mod - 2, mod) % mod);
      res = res + now;
      continue;
    }
    now = compute(qq, abs(k - 2 * i));
    now = compute(now, x + 1);
    id = k - 2 * i;
    if (id < 0) now = one / now;
    if ((x + 1) % 2 && i % 2) {
      now.coef[0] = (mod - now.coef[0]) % mod;
      now.coef[1] = (mod - now.coef[1]) % mod;
    }
    now = one - now;
    if (i % 2) {
      now.coef[0] = (mod - now.coef[0]) % mod;
      now.coef[1] = (mod - now.coef[1]) % mod;
    }
    wuli bw = nw = compute(qq, abs(k - 2 * i));
    if (k - 2 * i < 0) nw = one / nw;
    nw = nw * nw;
    now = now * nw;
    for (j = 0; j < 2; j++)
      now.coef[j] = (int)((long long)c[k][i] * (long long)now.coef[j] % mod);
    nw = bw;
    if (k - 2 * i < 0) nw = one / nw;
    if (i % 2) {
      for (j = 0; j < 2; j++) nw.coef[j] = (mod - nw.coef[j]) % mod;
    }
    nw = one - nw;
    nw = nw * awp;
    now = now / nw;
    res = res + now;
  }
  return res.coef[0];
}
int solve(long long x) {
  int ret = 0, i, j, s, p, q;
  for (i = 0; i <= k; i++) {
    if (stir[k][i] == 0) continue;
    int vl = (int)((long long)stir[k][i] * (long long)compute(x, i) % mod);
    vl = (int)((long long)vl * (long long)power(fac[k], mod - 2, mod) % mod);
    ret = (ret + vl) % mod;
  }
  return ret;
}
int main() {
  wuli test;
  re = power(2, mod - 2, mod);
  qq.coef[0] = qq.coef[1] = re;
  one.coef[0] = 1;
  one.coef[1] = 0;
  ge.coef[0] = 0;
  ge.coef[1] = 1;
  scanf("%d%I64d%I64d", &k, &l, &r);
  int i, j;
  for (i = 0; i <= k; i++)
    for (j = 0; j <= i; j++) {
      if (j == 0 || j == i)
        c[i][j] = 1;
      else
        c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % mod;
    }
  for (i = 0; i <= k; i++) {
    if (i == 0)
      fac[i] = 1;
    else
      fac[i] = (int)((long long)fac[i - 1] * (long long)i % mod);
  }
  stir[0][0] = 1;
  for (i = 0; i <= k; i++)
    for (j = 0; j <= i; j++) {
      if (stir[i][j] == 0) continue;
      if (i == k) continue;
      stir[i + 1][j] += (int)((long long)stir[i][j] * (long long)(-i) % mod);
      stir[i + 1][j] = (stir[i + 1][j] + mod) % mod;
      stir[i + 1][j + 1] = (stir[i + 1][j + 1] + stir[i][j]) % mod;
    }
  printf("%d\n", (solve(r) - solve(l - 1) + mod) % mod);
  return 0;
}