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>
struct Math {
  static const int mod = 1e9 + 7;
  int sum(int x, int y) { return x + y < mod ? x + y : x + y - mod; }
  int product(int x, int y) { return 1ll * x * y % mod; }
  int difference(int x, int y) { return x - y < 0 ? x - y + mod : x - y; }
  int inversion(int x) {
    int y = 1, n = mod - 2;
    while (n) {
      if (n & 1) y = 1ll * y * x % mod;
      n >>= 1;
      x = 1ll * x * x % mod;
    }
    return y;
  }
  int quotient(int x, int y) { return product(x, inversion(y)); }
} math;
struct Info {
  int x, y;
  Info() {}
  Info(int x, int y) : x(x), y(y) {}
};
Info operator+(const Info &a, const Info &b) {
  return Info(math.sum(a.x, b.x), math.sum(a.y, b.y));
}
Info operator-(const Info &a, const Info &b) {
  return Info(math.difference(a.x, b.x), math.difference(a.y, b.y));
}
Info operator*(const Info &a, const Info &b) {
  return Info(
      math.sum(math.product(a.x, b.x), math.product(5, math.product(a.y, b.y))),
      math.sum(math.product(a.x, b.y), math.product(a.y, b.x)));
}
Info operator/(const Info &a, const Info &b) {
  return Info(
      math.quotient(math.difference(math.product(a.x, b.x),
                                    math.product(5, math.product(a.y, b.y))),
                    math.difference(math.product(b.x, b.x),
                                    math.product(5, math.product(b.y, b.y)))),
      math.quotient(
          math.difference(math.product(a.y, b.x), math.product(a.x, b.y)),
          math.difference(math.product(b.x, b.x),
                          math.product(5, math.product(b.y, b.y)))));
}
Info operator*(const Info &a, const int &b) {
  return Info(math.product(a.x, b), math.product(a.y, b));
}
Info quick_power(Info x, long long n) {
  Info y = Info(1, 0);
  while (n) {
    if (n & 1) y = y * x;
    x = x * x;
    n >>= 1;
  }
  return y;
}
const int maxn = 233;
int s[maxn][maxn], c[maxn][maxn];
Info x, y, z;
int calc(int k, long long n) {
  if (n == 0) return 0;
  Info ans = Info(0, 0);
  for (int j = 0; j <= k; ++j) {
    Info res = Info(0, 0);
    for (int i = 0; i <= j; ++i) {
      Info c = quick_power(x, i) * quick_power(y, j - i);
      Info d =
          (c.x == 1 && c.y == 0)
              ? Info(n % (long long)math.mod, 0)
              : (quick_power(c, n + 3) - quick_power(c, 3)) / (c - Info(1, 0));
      res = (j - i & 1) ? res - d * ::c[j][i] : res + d * ::c[j][i];
    }
    ans = ans + res * quick_power(z, j) * s[k][j];
  }
  return ans.x;
}
int main(int argc, char const *argv[]) {
  x = Info(math.quotient(1, 2), math.quotient(1, 2));
  y = Info(math.quotient(1, 2), math.difference(0, math.quotient(1, 2)));
  z = Info(0, math.quotient(1, 5));
  int k, pw = 1;
  long long l, r;
  scanf("%d%I64d%I64d", &k, &l, &r);
  s[0][0] = 1;
  for (int i = 1; i <= k; ++i)
    for (int j = 1; j <= i; ++j)
      s[i][j] =
          math.difference(s[i - 1][j - 1], math.product(i - 1, s[i - 1][j]));
  c[0][0] = 1;
  for (int i = 1; i <= k; ++i) {
    c[i][0] = c[i][i] = 1;
    for (int j = 1; j < i; ++j)
      c[i][j] = math.sum(c[i - 1][j - 1], c[i - 1][j]);
  }
  for (int i = 1; i <= k; ++i) pw = math.product(pw, i);
  printf("%d\n",
         math.quotient(math.difference(calc(k, r), calc(k, l - 1)), pw));
  return 0;
}