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;
const int mo = 1e9 + 7;
int k;
long long l, r;
long long js[N], inv[N];
long long c[N];
struct comp {
  long long x, y;
  comp(const long long x_ = 0, const long long y_ = 0) {
    x = x_;
    y = y_;
  }
} a0, a1;
long long add(long long x, long long y) {
  return x + y >= mo ? x + y - mo : x + y;
}
long long dec(long long x, long long y) { return x < y ? x - y + mo : x - y; }
comp operator+(comp a, comp b) { return comp(add(a.x, b.x), add(a.y, b.y)); }
comp operator-(comp a, comp b) { return comp(dec(a.x, b.x), dec(a.y, b.y)); }
comp operator*(comp a, comp b) {
  return comp((a.x * b.x % mo + a.y * b.y % mo * 5) % mo,
              (a.x * b.y % mo + a.y * b.x % mo) % mo);
}
long long quickmi(long long x, long long tim) {
  long long ret = 1;
  for (; tim; tim /= 2, x = x * x % mo)
    if (tim & 1) ret = ret * x % mo;
  return ret;
}
comp quickmi(comp x, long long tim) {
  comp ret = comp(1, 0);
  for (; tim; tim /= 2, x = x * x)
    if (tim & 1) ret = ret * x;
  return ret;
}
comp getinv(comp a) {
  long long tmp = (a.x * a.x % mo + mo - a.y * a.y % mo * 5 % mo) % mo;
  tmp = quickmi(tmp, mo - 2);
  return comp(a.x * tmp % mo, dec(0, a.y * tmp % mo));
}
long long calc(int n, int m) { return js[n] * inv[m] % mo * inv[n - m] % mo; }
long long solve(long long n) {
  comp ret = comp(0, 0);
  comp inv5 = comp(0, quickmi(5, mo - 2));
  for (int i = 0; i <= k; i++)
    if (c[i]) {
      comp sum = comp(0, 0);
      for (int j = 0; j <= i; j++) {
        int tim = i - j * 2;
        long long cv = calc(i, j);
        if (tim > 0) {
          comp u = quickmi(comp(mo - 1, 0), j) * quickmi(a0, tim);
          comp v = quickmi(u, n + 1) - comp(1, 0);
          u = u - comp(1, 0);
          sum = sum + v * getinv(u) * comp(cv, 0) * quickmi(comp(mo - 1, 0), j);
        }
        if (tim == 0) {
          if (j & 1)
            sum = sum + comp(n & 1 ? 0 : mo - 1, 0) * comp(cv, 0);
          else
            sum = sum + comp((n + 1) % mo, 0) * comp(cv, 0);
        }
        if (tim < 0) {
          comp u = quickmi(comp(mo - 1, 0), j) * quickmi(a1, -tim);
          comp v = quickmi(u, n + 1) - comp(1, 0);
          u = u - comp(1, 0);
          sum = sum + v * getinv(u) * comp(cv, 0) * quickmi(comp(mo - 1, 0), j);
        }
      }
      sum = sum * quickmi(inv5, i) * comp(c[i], 0);
      ret = ret + sum;
    }
  return ret.x;
}
int main() {
  scanf("%d%I64d%I64d", &k, &l, &r);
  a0 = comp((mo + 1) / 2, (mo + 1) / 2);
  a1 = getinv(a0);
  js[0] = 1;
  for (int i = 1; i <= k; i++) js[i] = js[i - 1] * i % mo;
  inv[0] = inv[1] = 1;
  for (int i = 2; i <= k; i++) inv[i] = 1ll * (mo - mo / i) * inv[mo % i] % mo;
  for (int i = 2; i <= k; i++) inv[i] = inv[i] * inv[i - 1] % mo;
  c[0] = 1;
  for (int i = 0; i <= k - 1; i++) {
    long long v = (mo - i) % mo;
    for (int j = k; j >= 1; j--) c[j] = (c[j] * v + c[j - 1]) % mo;
    c[0] = c[0] * v % mo;
  }
  printf("%I64d\n", (solve(r + 2) + mo - solve(l + 1)) % mo * inv[k] % mo);
  return 0;
}