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 mo = int(1e9) + 7;
struct node {
  int a, b;
  node(void) {}
  node(int a, int b) : a(a), b(b) {}
};
node operator+(const node &a, const node &b) {
  return node((a.a + b.a) % mo, (a.b + b.b) % mo);
}
node operator-(const node &a, const node &b) {
  return node((a.a - b.a + mo) % mo, (a.b - b.b + mo) % mo);
}
node operator*(const node &a, const int &b) {
  return node(a.a * 1ll * b % mo, a.b * 1ll * b % mo);
}
node operator*(const int &a, const node &b) { return b * a; }
node operator*(const node &a, const node &b) {
  return node((a.a * 1ll * b.a % mo + 5ll * a.b * b.b % mo) % mo,
              (a.b * 1ll * b.a + a.a * 1ll * b.b) % mo);
}
int fac[505], c[505][505], k;
node pow(node a, int b) {
  node tmp = node(1, 0);
  for (; b; b >>= 1, a = a * a)
    if (b & 1) tmp = tmp * a;
  return tmp;
}
int pow(int a, int b) {
  int tmp = 1;
  for (; b; b >>= 1, a = a * 1ll * a % mo)
    if (b & 1) tmp = tmp * 1ll * a % mo;
  return tmp;
}
pair<node, node> radius_sum(long long n, node base) {
  if (n == 1) return make_pair(base, base);
  pair<node, node> tmp = radius_sum(n / 2, base);
  pair<node, node> ret =
      make_pair(tmp.first * (node(1, 0) + tmp.second), tmp.second * tmp.second);
  if (n & 1) ret.second = ret.second * base, ret.first = ret.first + ret.second;
  return ret;
}
long long work(long long n, int k) {
  n += 2;
  node a = node(pow(2, mo - 2), pow(2, mo - 2)),
       b = node(pow(2, mo - 2), mo - pow(2, mo - 2)), tmp = node(0, 0);
  for (int j = 0; j <= k; j++) {
    node base = pow(a, j) * pow(b, k - j),
         v = c[k][j] * radius_sum(n, base).first;
    if ((k - j) & 1)
      tmp = tmp - v;
    else
      tmp = tmp + v;
  }
  return ((tmp * pow(node(0, pow(5, mo - 2)), k)).a - 1 + mo) % mo;
}
int calc(long long n) {
  int ret = 0;
  for (int i = 0; i <= k; i++)
    ret = (ret + fac[i] * 1ll * work(n, i) % mo) % mo;
  return ret;
}
int main() {
  long long l, r;
  scanf("%lld%lld%lld", &k, &l, &r);
  fac[0] = 1;
  for (int i = 0; i <= k; i++) {
    c[i][0] = 1;
    for (int j = 1; j <= i; j++) c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % mo;
  }
  for (int i = 0; i < k; i++) {
    for (int j = i + 1; j >= 0; j--) {
      fac[j] = fac[j] * 1ll * (mo - i) % mo;
      if (j) fac[j] = (fac[j] + fac[j - 1]) % mo;
    }
  }
  int rev = 1;
  for (int i = 1; i <= k; i++) rev = rev * 1ll * pow(i, mo - 2) % mo;
  for (int i = 0; i <= k; i++) fac[i] = fac[i] * 1ll * rev % mo;
  printf("%d\n", (calc(r) - calc(l - 1) + mo) % mo);
  return 0;
}