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 = 205, mod = 1e9 + 7;
int upt(int x) {
  while (x >= mod) x -= mod;
  while (x < 0) x += mod;
  return x;
}
int pw(int x, int k) {
  int ret = 1;
  while (k) {
    if (k & 1) ret = (long long)ret * x % mod;
    x = (long long)x * x % mod;
    k >>= 1;
  }
  return ret;
}
int k, s[N][N], c[N][N], ans;
int tlen;
long long l, r, len;
struct Node {
  int x, y;
  Node(int x = 0, int y = 0) : x(x), y(y) {}
  Node operator+(const Node &b) const {
    return Node(upt(x + b.x), upt(y + b.y));
  }
  Node operator-(const Node &b) const {
    return Node(upt(x - b.x), upt(y - b.y));
  }
  Node operator*(const Node &b) const {
    return Node(((long long)x * b.x + (long long)y * b.y % mod * 5) % mod,
                ((long long)x * b.y + (long long)y * b.x) % mod);
  }
} A[N], B[N], x1[N], x2[N], one;
Node pw(Node x, long long k) {
  Node ret = one;
  while (k) {
    if (k & 1) ret = ret * x;
    x = x * x;
    k >>= 1;
  }
  return ret;
}
void init() {
  s[0][0] = 1;
  for (int i = 1; i <= k; i++)
    for (int j = 1; j <= i; j++)
      s[i][j] = (s[i - 1][j - 1] + (long long)s[i - 1][j] * (i - 1)) % mod;
  for (int i = 0; i <= k; i++) c[i][0] = 1;
  for (int i = 1; i <= k; i++)
    for (int j = 1; j <= i; j++) c[i][j] = upt(c[i - 1][j - 1] + c[i - 1][j]);
  one = Node(1, 0);
  int tp = pw(5, mod - 2);
  A[1] = Node(0, tp);
  B[1] = Node(0, upt(-tp));
  tp = pw(2, mod - 2);
  x1[1] = Node(tp, tp);
  x2[1] = Node(tp, upt(-tp));
  A[0] = B[0] = x1[0] = x2[0] = one;
  for (int i = 2; i <= k; i++) A[i] = A[i - 1] * A[1];
  for (int i = 2; i <= k; i++) B[i] = B[i - 1] * B[1];
  for (int i = 2; i <= k; i++) x1[i] = x1[i - 1] * x1[1];
  for (int i = 2; i <= k; i++) x2[i] = x2[i - 1] * x2[1];
}
Node Inv(Node x) {
  int tp = upt(((long long)x.x * x.x - (long long)x.y * x.y % mod * 5) % mod);
  tp = pw(tp, mod - 2);
  return Node((long long)x.x * tp % mod, upt(-(long long)x.y * tp % mod));
}
Node cal(Node x) {
  if (x.x == 1 && x.y == 0) return Node(tlen, 0);
  return pw(x, l) * (one - pw(x, len)) * Inv(one - x);
}
int main() {
  scanf("%d%lld%lld", &k, &l, &r);
  l += 2;
  r += 2;
  init();
  len = r - l + 1;
  tlen = len % mod;
  for (int j = 0, fx = ((k & 1) ? upt(-1) : 1); j <= k; j++, fx = upt(-fx)) {
    int tp = 0;
    for (int t = 0; t <= j; t++) {
      Node d = cal(x1[t] * x2[j - t]);
      d = d * A[t] * B[j - t];
      tp = (tp + (long long)c[j][t] * d.x) % mod;
    }
    ans = (ans + (long long)s[k][j] * fx % mod * tp) % mod;
  }
  int ml = 1;
  for (int i = 2; i <= k; i++) ml = (long long)ml * i % mod;
  ml = pw(ml, mod - 2);
  ans = (long long)ans * ml % mod;
  printf("%d\n", ans);
  return 0;
}