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;
int K;
long long L, R;
int qpow(int x, int y) {
  int ret = 1;
  while (y) {
    if (y & 1) ret = (long long)ret * x % 1000000007;
    x = (long long)x * x % 1000000007;
    y >>= 1;
  }
  return ret;
}
struct node {
  int x, y;
  node() {}
  node(int x, int y) : x(x), y(y) {}
  friend node operator+(const node &r1, const node &r2) {
    return node((r1.x + r2.x) % 1000000007, (r1.y + r2.y) % 1000000007);
  }
  friend node operator-(const node &r1, const node &r2) {
    return node((r1.x - r2.x + 1000000007) % 1000000007,
                (r1.y - r2.y + 1000000007) % 1000000007);
  }
  friend node operator*(const node &r1, const node &r2) {
    return node(
        ((long long)r1.x * r2.x + (long long)r1.y * r2.y % 1000000007 * 5) %
            1000000007,
        ((long long)r1.x * r2.y + (long long)r1.y * r2.x) % 1000000007);
  }
  friend node operator*(int x, const node &r1) {
    return node((long long)r1.x * x % 1000000007,
                (long long)r1.y * x % 1000000007);
  }
  friend node operator/(const node &r1, const node &r2) {
    int t =
        (((long long)r2.x * r2.x - (long long)r2.y * r2.y % 1000000007 * 5) %
             1000000007 +
         1000000007) %
        1000000007;
    t = qpow(t, 1000000007 - 2);
    return r1 * node((long long)r2.x * t % 1000000007,
                     (long long)(1000000007 - r2.y) * t % 1000000007);
  }
} v1[210], v2[210], v3[210];
int a[210], C[210][210];
void init() {
  v1[0] = v2[0] = v3[0] = node(1, 0);
  v1[1] = node(1, 0) / node(0, 1);
  v2[1] = node(1, 1) / node(2, 0);
  v3[1] = node(1, 1000000007 - 1) / node(2, 0);
  for (int i = 2; i <= K; i++) {
    v1[i] = v1[i - 1] * v1[1];
    v2[i] = v2[i - 1] * v2[1];
    v3[i] = v3[i - 1] * v3[1];
  }
  for (int i = 0; i <= K; i++) C[i][0] = 1;
  for (int i = 1; i <= K; i++)
    for (int j = 1; j <= K; j++)
      C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % 1000000007;
}
node qpow(node x, long long y) {
  node ret(1, 0);
  while (y) {
    if (y & 1) ret = ret * x;
    y >>= 1;
    x = x * x;
  }
  return ret;
}
node get(node x, long long n) {
  if (x.x == 1 && x.y == 0) return node(n % 1000000007, 0);
  return (qpow(x, n + 1) - x) / (x - node(1, 0));
}
int find(long long n, int m) {
  node ret(0, 0);
  for (int i = 0; i <= m; i++) {
    node t = get(v2[i] * v3[m - i], n);
    int v = (m - i) & 1 ? 1000000007 - C[m][i] : C[m][i];
    ret = ret + v * t;
  }
  ret = v1[m] * ret;
  return ret.x;
}
int calc(long long n) {
  int ret = 0;
  memset(a, 0, sizeof(a));
  a[0] = 1;
  for (int i = 0; i < K; i++) {
    for (int j = K; j >= 1; j--)
      a[j] = ((long long)a[j] * (1000000007 - i) % 1000000007 + a[j - 1]) %
             1000000007;
    a[0] = (long long)a[0] * (1000000007 - i) % 1000000007;
  }
  for (int i = 0; i <= K; i++) {
    int t = find(n, i);
    ret = (ret + (long long)a[i] * t) % 1000000007;
  }
  int t = 1;
  for (int i = 1; i <= K; i++) t = (long long)t * i % 1000000007;
  t = qpow(t, 1000000007 - 2);
  return (long long)t * ret % 1000000007;
}
int main() {
  scanf("%d%I64d%I64d", &K, &L, &R);
  init();
  printf("%d\n", (calc(R + 2) - calc(L + 1) + 1000000007) % 1000000007);
  return 0;
}