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;
void file(string s) {
  freopen((s + ".in").c_str(), "r", stdin);
  freopen((s + ".out").c_str(), "w", stdout);
}
template <typename Tp>
void read(Tp &x) {
  long long fh = 1;
  char c = getchar();
  x = 0;
  while (c > '9' || c < '0') {
    if (c == '-') {
      fh = -1;
    }
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 1) + (x << 3) + (c & 15);
    c = getchar();
  }
  x *= fh;
}
long long ksm(long long b, long long p, long long Mod = 1000000007) {
  long long ret = 1;
  while (p) {
    if (p & 1) {
      ret = 1ll * ret * b % Mod;
    }
    b = b * b % Mod;
    p >>= 1;
  }
  return ret;
}
struct CP {
  long long x, y;
  void mdl() {
    x = (x % 1000000007 + 1000000007) % 1000000007;
    y = (y % 1000000007 + 1000000007) % 1000000007;
  }
  CP operator+(CP z) const {
    CP ret = (CP){(x + z.x) % 1000000007, (y + z.y) % 1000000007};
    ret.mdl();
    return ret;
  }
  CP operator+(long long z) const {
    CP ret = (CP){(x + z) % 1000000007, y};
    ret.mdl();
    return ret;
  }
  CP operator-(CP z) const {
    CP ret = (CP){(x - z.x + 1000000007) % 1000000007,
                  (y - z.y + 1000000007) % 1000000007};
    ret.mdl();
    return ret;
  }
  CP operator-(long long z) const {
    CP ret = (CP){(x - z) % 1000000007, y};
    ret.mdl();
    return ret;
  }
  CP operator*(CP z) const {
    CP ret = (CP){
        (1ll * x * z.x % 1000000007 + 5ll * y * z.y % 1000000007) % 1000000007,
        (1ll * x * z.y % 1000000007 + 1ll * y * z.x % 1000000007) % 1000000007};
    ret.mdl();
    return ret;
  }
  CP operator*(long long z) const {
    CP ret = (CP){1ll * x * z % 1000000007, 1ll * y * z % 1000000007};
    ret.mdl();
    return ret;
  }
  CP operator/(CP z) const {
    CP t = (CP){x, y} * (CP){z.x, (1000000007 - z.y) % 1000000007};
    long long tt = ((1ll * z.x * z.x % 1000000007 -
                     5ll * z.y * z.y % 1000000007 + 1000000007) %
                        1000000007 +
                    1000000007) %
                   1000000007,
              iv = ksm(tt, 1000000007 - 2, 1000000007);
    CP ret = (CP){1ll * t.x * iv % 1000000007, 1ll * t.y * iv % 1000000007};
    ret.mdl();
    return ret;
  }
  CP operator/(long long z) const {
    long long iv = ksm(z, 1000000007 - 2);
    CP ret = (CP){1ll * x * iv % 1000000007, 1ll * y * iv % 1000000007};
    ret.mdl();
    return ret;
  }
  bool operator<(CP z) const { return (x == z.x) ? y < z.y : x < z.x; }
  bool operator==(CP z) const { return (x == z.x) && (y == z.y); }
};
CP ksm(CP b, long long p) {
  CP ret = (CP){1, 0};
  while (p) {
    if (p & 1) ret = ret * b;
    b = b * b;
    p >>= 1;
  }
  return ret;
}
long long S1[505][505], C[505][505], frac[505], frinv[505];
void prep_s1(long long N) {
  S1[0][0] = 1;
  for (long long i = 1; i <= N; ++i) {
    S1[i][0] = 0;
    S1[i][i] = 1;
    for (long long j = 1; j < i; ++j) {
      S1[i][j] =
          (S1[i - 1][j - 1] + 1ll * (i - 1) * S1[i - 1][j] % 1000000007) %
          1000000007;
    }
  }
  for (long long i = 0; i <= N; ++i) {
    C[i][0] = C[i][i] = 1;
    for (long long j = 1; j < i; ++j) {
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % 1000000007;
    }
  }
  frac[0] = 1;
  for (long long i = 1; i <= N; ++i)
    frac[i] = 1ll * frac[i - 1] * i % 1000000007;
  frinv[N] = ksm(frac[N], 1000000007 - 2);
  for (long long i = N; i; --i) frinv[i - 1] = 1ll * frinv[i] * i % 1000000007;
}
CP get_qp(CP x, long long p) {
  x.mdl();
  if (x.x == 1 && x.y == 0) return x * p;
  return (ksm(x, p) - 1) / (x - 1);
}
long long calc(long long n, long long k) {
  long long ret = 0;
  for (long long j = 0; j <= k; ++j) {
    long long ts = S1[k][j];
    if ((k - j) & 1) ts = 1000000007 - ts;
    CP sm = (CP){0, 0};
    for (long long t = 0; t <= j; ++t) {
      CP u1 = (CP){1, 1} / 2, u2 = (CP){1, -1} / 2;
      CP q = ksm(u1, t) * ksm(u2, j - t);
      if ((j - t) & 1)
        sm = sm - get_qp(q, n + 1) * C[j][t];
      else
        sm = sm + get_qp(q, n + 1) * C[j][t];
    }
    sm = sm * ((CP){1, 0} / (ksm((CP){0, 1}, j)));
    ret = (ret + 1ll * ts * sm.x % 1000000007) % 1000000007;
  }
  ret = 1ll * ret * frinv[k] % 1000000007;
  return ret;
}
signed main() {
  long long K, L, R;
  read(K);
  read(L);
  read(R);
  ++L;
  ++R;
  ++L;
  ++R;
  prep_s1(K);
  long long ans = calc(R, K) - calc(L - 1, K);
  printf("%d\n", (ans % 1000000007 + 1000000007) % 1000000007);
  return 0;
}