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 long long N = 403, yyb = 1e9 + 7, inv2 = 500000004;
char buf[1000000], *p1, *p2;
inline char getChar() {
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1000000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline long long read() {
  long long f = 0;
  register char c;
  while (!isdigit(c = getChar())) {
  }
  do f = f * 10 + (c ^ 48);
  while (isdigit(c = getChar()));
  return f;
}
inline long long power(long long x, long long y) {
  long long o = 1;
  for (; y; y >>= 1, x = x * x % yyb)
    if (y & 1) o = o * x % yyb;
  return o;
}
struct NewNum {
  long long a, b;
  NewNum() {}
  NewNum(long long a, long long b) : a(a), b(b) {}
  friend NewNum operator+(const NewNum& x, const NewNum& y) {
    return NewNum((x.a + y.a) % yyb, (x.b + y.b) % yyb);
  }
  friend NewNum operator+(const NewNum& x, const long long& y) {
    return NewNum((x.a + y) % yyb, x.b);
  }
  friend NewNum operator-(const NewNum& x, const NewNum& y) {
    return NewNum((x.a - y.a) % yyb, (x.b - y.b) % yyb);
  }
  friend NewNum operator-(const NewNum& x, const long long& y) {
    return NewNum((x.a - y) % yyb, x.b);
  }
  friend NewNum operator*(const NewNum& x, const NewNum& y) {
    return NewNum((x.a * y.a + 5 * x.b * y.b) % yyb,
                  (x.a * y.b + x.b * y.a) % yyb);
  }
  friend NewNum operator*(const NewNum& x, const long long& y) {
    return NewNum(x.a * y % yyb, x.b * y % yyb);
  }
  friend NewNum operator/(const NewNum& x, const NewNum& y) {
    return NewNum(x * NewNum(y.a, yyb - y.b) *
                  power((y.a * y.a - 5 * y.b * y.b) % yyb, yyb - 2));
  }
} inv[N];
inline NewNum power(NewNum x, long long y) {
  NewNum o = NewNum(1, 0);
  for (; y; y >>= 1, x = x * x)
    if (y & 1) o = o * x;
  return o;
}
long long k, facK, combine[N][N], stirling[N][N];
inline NewNum getPow(long long j, long long t) {
  return power(NewNum(inv2, inv2), t) * power(NewNum(inv2, yyb - inv2), j - t);
}
inline NewNum getSum(long long n, long long j, long long t) {
  NewNum x = getPow(j, t);
  if (x.a == 1 && x.b == 0) return NewNum(n, 0);
  return (power(x, n + 1) - x) / (x - 1);
}
inline long long calculate(long long n) {
  long long j, t;
  NewNum ans = NewNum(0, 0), o;
  for (j = 1; j <= k; ++j) {
    o = NewNum(0, 0);
    for (t = 0; t <= j; ++t)
      o = o + getSum(n, j, t) * ((j - t) & 1 ? -1 : 1) * combine[j][t];
    ans = ans + o * inv[j] * stirling[k][j] * facK * ((k + j) & 1 ? -1 : 1);
  }
  return ans.a;
}
signed main() {
  k = read();
  long long l = read(), r = read(), i, j;
  for (i = 0; i <= k; ++i) combine[i][0] = 1;
  for (i = 1; i <= k; ++i)
    for (j = 1; j <= i; ++j)
      combine[i][j] = (combine[i - 1][j - 1] + combine[i - 1][j]) % yyb;
  stirling[0][0] = stirling[1][1] = 1;
  for (i = 2; i <= k; ++i)
    for (j = 1; j <= i; ++j)
      stirling[i][j] =
          (stirling[i - 1][j] * (i - 1) + stirling[i - 1][j - 1]) % yyb;
  inv[0] = NewNum(1, 0), facK = 1;
  for (i = 1; i <= k; ++i)
    facK = facK * i % yyb, inv[i] = inv[i - 1] / NewNum(0, 1);
  facK = power(facK, yyb - 2);
  printf("%d\n", ((calculate(r + 2) - calculate(l + 1)) % yyb + yyb) % yyb);
  return 0;
}