#include <bits/stdc++.h>
using namespace std;
const long long N = 200 + 10;
const long long MOD = 1e9 + 7;
template <typename Tp>
void read(Tp &x) {
  x = 0;
  long long op = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') op = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= op;
}
template <typename Tp>
void CMax(Tp &x, Tp y) {
  if (y < x) x = y;
}
template <typename Tp>
void CMin(Tp &x, Tp y) {
  if (y > x) x = y;
}
long long power(long long x, long long p) {
  long long ret = 1;
  while (p) {
    if (p & 1) ret = 1ll * ret * x % MOD;
    x = 1ll * x * x % MOD;
    p >>= 1;
  }
  return ret;
}
long long S1[N][N], fac[N], ifac[N];
long long w = 5;
struct CP {
  long long x, y;
  CP() { x = y = 0; }
  CP(long long _x, long long _y) : x(_x), y(_y) {}
} a, b, c, d;
CP operator+(CP A, CP B) {
  A.x += B.x;
  if (A.x >= MOD) A.x -= MOD;
  A.y += B.y;
  if (A.y >= MOD) A.y -= MOD;
  return A;
}
CP operator-(CP A, long long k) {
  A.x -= k;
  if (A.x < 0) A.x += MOD;
  return A;
}
CP operator-(CP A, CP B) {
  A.x -= B.x;
  if (A.x < 0) A.x += MOD;
  A.y -= B.y;
  if (A.y < 0) A.y += MOD;
  return A;
}
CP operator*(CP A, CP B) {
  CP C;
  C.x = (1ll * A.x * B.x % MOD + 1ll * A.y * B.y % MOD * w % MOD) % MOD;
  C.y = (1ll * A.y * B.x % MOD + 1ll * A.x * B.y % MOD) % MOD;
  return C;
}
CP operator/(CP A, CP B) {
  CP C;
  long long fm =
      (1ll * B.x * B.x % MOD - 1ll * w * B.y % MOD * B.y % MOD + MOD) % MOD;
  fm = power(fm, MOD - 2);
  C.x = (1ll * A.x * B.x % MOD - 1ll * A.y * B.y % MOD * w % MOD + MOD) % MOD *
        fm % MOD;
  C.y = (1ll * A.y * B.x % MOD - 1ll * A.y * B.x % MOD + MOD) % MOD * fm % MOD;
  return C;
}
CP power(CP x, long long p) {
  CP ret(1, 0);
  while (p) {
    if (p & 1) ret = ret * x;
    x = x * x;
    p >>= 1;
  }
  return ret;
}
void process(long long n) {
  fac[0] = 1;
  for (long long i = (1); i <= (n); ++i) fac[i] = 1ll * fac[i - 1] * i % MOD;
  ifac[n] = power(fac[n], MOD - 2);
  for (long long i = n - 1; i >= 0; --i)
    ifac[i] = 1ll * ifac[i + 1] * (i + 1) % MOD;
  S1[0][0] = 1;
  for (long long i = (1); i <= (n); ++i)
    for (long long j = (1); j <= (i); ++j)
      S1[i][j] = (1ll * (i - 1) * S1[i - 1][j] + S1[i - 1][j - 1]) % MOD;
  long long inv2 = power(2, MOD - 2), inv5 = power(5, MOD - 2);
  a = CP(0, inv5);
  b = CP(0, MOD - inv5);
  c = CP(inv2, inv2);
  d = CP(inv2, MOD - inv2);
}
long long C(long long n, long long m) {
  return 1ll * fac[n] * ifac[n - m] % MOD * ifac[m] % MOD;
}
long long k, l, r;
long long Ans;
signed main() {
  read(k);
  read(l);
  read(r);
  process(k);
  for (long long i = 1; i <= k; ++i) {
    CP ans(0, 0);
    for (long long j = 0; j <= i; ++j) {
      CP res(C(i, j), 0);
      res = res * power(a, j) * power(b, i - j);
      CP q = power(c, j) * power(d, i - j);
      if (q.x == 1 && q.y == 0)
        res.x = (r - l + 1) % MOD * res.x % MOD;
      else
        res = res * (power(q, r + 3) - power(q, l + 2)) / (q - 1);
      ans = ans + res;
    }
    if ((k - i) & 1) ans.x = (MOD - ans.x);
    Ans = (Ans + 1ll * ans.x * S1[k][i] % MOD) % MOD;
  }
  Ans = 1ll * Ans * ifac[k] % MOD;
  printf("%lld", Ans);
  return 0;
}
