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;
inline long long fast_pow(long long a, long long b, long long p) {
  long long t = 1;
  a %= p;
  while (b) {
    if (b & 1) t = t * a % p;
    b >>= 1;
    a = a * a % p;
  }
  return t;
}
long long ljc2;
inline char gc() {
  static char now[1 << 16], *S, *T;
  if (T == S) {
    T = (S = now) + fread(now, 1, 1 << 16, stdin);
    if (T == S) return EOF;
  }
  return *S++;
}
inline long long read() {
  register long long x = 0, f = 1;
  char ch = gc();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = gc();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = gc();
  }
  return (f == 1) ? x : -x;
}
int T, m;
long long sqr, L, R, K;
struct Comp {
  long long a, b;
};
Comp A, B, ar, be;
inline Comp init(long long a, long long b) {
  return (Comp){a % 1000000007, b % 1000000007};
}
Comp operator+(Comp a, Comp b) { return init(a.a + b.a, a.b + b.b); }
Comp operator-(Comp a, Comp b) {
  return init(a.a - b.a + 1000000007, a.b - b.b + 1000000007);
}
Comp operator*(Comp a, Comp b) {
  return init(a.a * b.a + sqr * a.b % 1000000007 * b.b, a.b * b.a + a.a * b.b);
}
inline Comp inv(Comp a) {
  long long FM = fast_pow(1000000007 + a.a * a.a % 1000000007 -
                              sqr * a.b % 1000000007 * a.b % 1000000007,
                          1000000007 - 2, 1000000007);
  return init(a.a * FM, 1000000007 - a.b * FM % 1000000007);
}
inline Comp cfast_pow(Comp a, long long b) {
  Comp t = init(1, 0);
  a.a %= 1000000007;
  a.b %= 1000000007;
  while (b) {
    if (b & 1) t = t * a;
    b >>= 1;
    a = a * a;
  }
  return t;
}
long long s[1001][1001], C[1001][1001];
inline long long calc(long long n, long long K) {
  long long fac = 1;
  Comp One = init(1, 0);
  for (long long i = 1; i <= K; i++) fac = 1LL * fac * i % 1000000007;
  fac = fast_pow(fac, 1000000007 - 2, 1000000007);
  long long ans = 0;
  for (long long j = 0, one = ((K) % 2LL ? 1000000007 - 1 : 1); j <= K;
       j++, one = 1000000007 - one) {
    Comp now = init(0, 0);
    for (long long d = 0; d <= j; d++) {
      Comp rev = cfast_pow(be, d) * cfast_pow(ar, j - d);
      Comp Rev = cfast_pow(rev, n + 1);
      if (rev.a == 1 && rev.b == 0)
        Rev.a = (n + 1) % 1000000007, Rev.b = 0;
      else {
        rev = inv(One - rev);
        Rev = (One - Rev) * rev;
      }
      Rev = Rev * cfast_pow(B, d) * cfast_pow(A, j - d);
      Rev.a = Rev.a * C[j][d] % 1000000007;
      Rev.b = Rev.b * C[j][d] % 1000000007;
      now = now + Rev;
    }
    ans = (ans + s[K][j] * one % 1000000007 * now.a % 1000000007) % 1000000007;
  }
  return ans * fac % 1000000007;
}
signed main() {
  T = 1;
  s[0][0] = C[0][0] = 1;
  for (long long i = 1; i <= 502; i++) {
    C[i][0] = 1;
    for (long long j = 1; j <= 502; j++) {
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % 1000000007;
      s[i][j] =
          (s[i - 1][j] * (i - 1) % 1000000007 + s[i - 1][j - 1]) % 1000000007;
    }
  }
  ljc2 = fast_pow(2, 1000000007 - 2, 1000000007);
  sqr = 5, ar = init(ljc2, ljc2), be = init(ljc2, 1000000007 - ljc2);
  A = init(0, fast_pow(5, 1000000007 - 2, 1000000007)),
  B = init(0, 1000000007 - fast_pow(5, 1000000007 - 2, 1000000007));
  while (T--) {
    long long K = read(), L = read(), R = read();
    R += 2;
    L += 1;
    printf("%lld\n", (calc(R, K) - calc(L, K) + 1000000007) % 1000000007);
  }
  return 0;
}