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;
long long qpow(long long x, long long t) {
  long long ans = 1;
  while (t) {
    if (t & 1) ans = ans * x % 1000000007LL;
    x = x * x % 1000000007LL;
    t >>= 1;
  }
  return ans;
}
long long inv(long long x) { return qpow(x, 1000000007LL - 2); }
long long inc(long long x, long long y) { return (x + y) % 1000000007LL; }
long long dec(long long x, long long y) {
  return (x - y + 1000000007LL * 1000000007LL) % 1000000007LL;
}
struct NUM {
  long long x, y;
  NUM(const long long &x0 = 0, const long long &y0 = 0) : x(x0), y(y0) {}
  NUM operator*(const long long &t) const {
    return NUM(x * t % 1000000007LL, y * t % 1000000007LL);
  }
  NUM operator+(const NUM &t) const { return NUM(inc(x, t.x), inc(y, t.y)); }
  NUM operator-(const NUM &t) const { return NUM(dec(x, t.x), dec(y, t.y)); }
  NUM operator*(const NUM &t) const {
    return NUM(inc(x * t.x, 5 * y * t.y), inc(x * t.y, y * t.x));
  }
  NUM operator/(const NUM &t) const {
    long long iv = inv(dec(t.x * t.x, 5 * t.y * t.y % 1000000007LL));
    return NUM(dec(x * t.x, 5 * y * t.y % 1000000007LL) * iv % 1000000007LL,
               dec(y * t.x, x * t.y) * iv % 1000000007LL);
  }
};
NUM qpow(NUM x, long long t) {
  NUM ans(1, 0);
  while (t) {
    if (t & 1) ans = ans * x;
    x = x * x;
    t >>= 1;
  }
  return ans;
}
NUM sum(NUM q, long long n) {
  NUM s(0, 0), t(1, 0);
  for (int i = 63; i >= 0; i--)
    if ((n >> i) & 1)
      s = (s * t + s + NUM(1, 0)) * q, t = t * t * q;
    else
      s = s * t + s, t = t * t;
  return s;
}
long long k, l, r;
long long sumk[505];
long long C[505][505];
long long poly[505];
void init() {
  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] + C[i - 1][j - 1]) % 1000000007LL;
  }
}
int main() {
  scanf("%lld%lld%lld", &k, &l, &r);
  r += 2, l += 2;
  init();
  for (int i = 1; i <= k; i++) {
    NUM s(0, 0);
    for (int j = 0; j <= i; j++) {
      NUM x1 = qpow(NUM(inv(2), inv(2)), j);
      NUM x2 = qpow(NUM(inv(2), 1000000007LL - inv(2)), i - j);
      s = s + (sum(x1 * x2, r) - sum(x1 * x2, l - 1)) * C[i][j] *
                  ((j & 1) ? (1000000007LL - 1) : (1));
    }
    s = s / qpow(NUM(0, 1000000007LL - 1), i);
    assert(!s.y);
    sumk[i] = s.x;
  }
  poly[0] = 1;
  for (int i = 0; i < k; i++) {
    for (int j = k; j >= 1; j--)
      poly[j] = dec(poly[j - 1], poly[j] * i) % 1000000007LL;
    poly[0] = 0;
  }
  long long ans = 0, dv = 1;
  for (int i = 1; i <= k; i++) dv = dv * inv(i) % 1000000007LL;
  for (int i = 1; i <= k; i++) ans = (ans + poly[i] * sumk[i]) % 1000000007LL;
  printf("%lld\n", ans * dv % 1000000007LL);
  return 0;
}