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;
namespace FI {
const int SIZE = 1 << 18 | 1;
char buf[SIZE], *front, *back;
void Char(char &c) {
  if (front == back) back = (front = buf) + fread(buf, 1, SIZE, stdin);
  c = (front == back) ? (char)EOF : *front++;
}
template <typename T>
void Num(T &x) {
  char c;
  int f = 1;
  for (Char(c); c > '9' || c < '0'; Char(c))
    if (c == '-') f = -1;
  for (x = 0; c >= '0' && c <= '9'; Char(c)) x = x * 10 + c - '0';
  x *= f;
}
}  // namespace FI
const int mod = 1e9 + 7;
const int inv2 = 5e8 + 4;
const int maxn = 200 + 47;
int add(int a, int b) { return (a + b) % mod; }
int sub(int a, int b) { return (a - b + mod) % mod; }
int mul(int a, int b) { return 1LL * a * b % mod; }
int fpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = mul(res, a);
    a = mul(a, a);
    b >>= 1;
  }
  return res;
}
int inv(int a) { return fpow(a, mod - 2); }
long long k, l, r;
int frac[maxn], bakf[maxn];
int f[maxn];
struct num {
  int x, y;
  num(int x = 0, int y = 0) : x(x), y(y) {}
  num conj() { return num(x, sub(0, y)); }
  friend bool operator==(num a, num b) { return a.x == b.x && a.y == b.y; }
  friend num operator+(num a, num b) {
    return num(add(a.x, b.x), add(a.y, b.y));
  }
  friend num operator+(num a, int b) { return num(add(a.x, b), a.y); }
  friend num operator-(num a, num b) {
    return num(sub(a.x, b.x), sub(a.y, b.y));
  }
  friend num operator-(num a, int b) { return num(sub(a.x, b), a.y); }
  friend num operator*(num a, num b) {
    return num(add(mul(a.x, b.x), mul(5, mul(a.y, b.y))),
               add(mul(a.x, b.y), mul(a.y, b.x)));
  }
  friend num operator*(num a, int b) { return num(mul(a.x, b), mul(a.y, b)); }
  friend num operator/(num a, num b) {
    return a * b.conj() * inv(sub(mul(b.x, b.x), mul(5, mul(b.y, b.y))));
  }
  friend num operator/(num a, int b) {
    return num(mul(a.x, inv(b)), mul(a.y, inv(b)));
  }
} a[maxn], b[maxn];
int C(int a, int b) { return mul(mul(frac[a], bakf[b]), bakf[a - b]); }
num fpow(num a, long long b) {
  num res = num(1, 0);
  while (b) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
int main() {
  FI::Num(k), FI::Num(l), FI::Num(r);
  l++, r += 2;
  frac[0] = 1;
  for (int i = (1); i <= (k); i++) frac[i] = mul(frac[i - 1], i);
  bakf[k] = inv(frac[k]);
  for (int i = (k - 1); i >= (0); i--) bakf[i] = mul(bakf[i + 1], i + 1);
  f[0] = 1;
  for (int i = (0); i != (k); i++)
    for (int j = (i); j >= (0); j--) {
      f[j + 1] = add(f[j + 1], f[j]);
      f[j] = mul(f[j], sub(0, i));
    }
  num sqrt5 = num(0, 1), sq5k = num(1, 0), ans;
  a[0] = num(1, 0);
  for (int i = (1); i <= (k); i++) a[i] = a[i - 1] * num(inv2, inv2);
  b[0] = num(1, 0);
  for (int i = (1); i <= (k); i++) b[i] = b[i - 1] * num(inv2, sub(0, inv2));
  for (int i = (1); i <= (k); i++) {
    num sum;
    sq5k = sq5k * sqrt5;
    for (int j = (0); j <= (i); j++) {
      int k = (j & 1) ? sub(0, C(i, j)) : C(i, j);
      num q = a[i - j] * b[j];
      if (q == num(1, 0))
        sum = sum + mul((r - l) % mod, k);
      else
        sum = sum + (fpow(q, r + 1) - fpow(q, l + 1)) / (q - 1) * k;
    }
    ans = ans + sum * f[i] / sq5k;
  }
  int _ans = ans.x;
  _ans = mul(_ans, bakf[k]);
  printf("%d\n", _ans);
  return 0;
}