#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long inv2 = mod + 1 >> 1;
template <typename tp>
inline void read(tp& dig) {
  char ch = getchar();
  long long flag = 0;
  dig = 0;
  while (!isdigit(ch)) {
    if (ch == '-') flag = 1;
    ch = getchar();
  }
  while (isdigit(ch)) dig = dig * 10 + ch - '0', ch = getchar();
  if (flag) dig = -dig;
}
inline long long F(long long x) { return x >= mod ? x - mod : x; }
long long K, L, R, ans, num[210];
struct cpx {
  long long x, y;
  cpx(long long A = 0, long long B = 0) { x = A, y = B; }
} A, B, C;
inline cpx operator+(cpx a, cpx b) { return cpx(F(a.x + b.x), F(a.y + b.y)); }
inline cpx operator-(cpx a, cpx b) {
  return cpx(F(a.x - b.x + mod), F(a.y - b.y + mod));
}
inline cpx operator*(cpx a, cpx b) {
  return cpx((1LL * a.x * b.x + 5LL * a.y * b.y % mod) % mod,
             (1LL * a.x * b.y + 1LL * a.y * b.x) % mod);
}
inline cpx conj(cpx a) { return cpx(a.x, mod - a.y); }
inline long long Ksm(long long x, long long t) {
  long long res = 1;
  while (t) {
    if (t & 1) res = 1LL * res * x % mod;
    x = 1LL * x * x % mod;
    t >>= 1;
  }
  return res;
}
inline cpx ksm(cpx x, long long t) {
  cpx res(1, 0);
  while (t) {
    if (t & 1) res = res * x;
    x = x * x;
    t >>= 1;
  }
  return res;
}
inline long long calc(long long N) {
  cpx X = C;
  long long res = 0;
  for (long long i = 1, inv; i <= K; ++i) {
    cpx sum(0, 0);
    for (long long j = 0, c = 1; j <= i; ++j) {
      cpx t = ksm(A, i - j) * ksm(B, j);
      if (t.x == 1 && t.y == 0) {
        if (j & 1)
          sum.x = F(sum.x - (N + 1) % mod * c % mod + mod);
        else
          sum.x = F(sum.x + (N + 1) % mod * c % mod);
        c = 1LL * c * (i - j) % mod * Ksm(j + 1, mod - 2) % mod;
        continue;
      }
      cpx T(F(mod + t.x - 1), t.y);
      t = ksm(t, N + 1);
      t.x = F(t.x + mod - 1);
      t = t * conj(T);
      T = T * conj(T);
      inv = Ksm(T.x, mod - 2);
      t.x = 1LL * t.x * c % mod * inv % mod;
      t.y = 1LL * t.y * c % mod * inv % mod;
      c = 1LL * c * (i - j) % mod * Ksm(j + 1, mod - 2) % mod;
      if (j & 1)
        sum = sum - t;
      else
        sum = sum + t;
    }
    sum = sum * X;
    X = X * C;
    res = F(res + 1LL * num[i] * sum.x % mod);
  }
  return res;
}
int main() {
  read(K);
  read(L);
  read(R);
  R += 2;
  L += 2;
  A = cpx(inv2, inv2);
  B = cpx(inv2, mod - inv2);
  C = cpx(0, Ksm(5, mod - 2));
  num[1] = 1;
  ans = K;
  for (long long i = 1; i < K; ++i) {
    ans = 1LL * ans * i % mod;
    for (long long j = K; j; --j)
      num[j] = F(1LL * num[j] * (mod - i) % mod + num[j - 1]);
  }
  ans = Ksm(ans, mod - 2);
  ans = 1LL * ans * F(calc(R) - calc(L - 1) + mod) % mod;
  printf("%d\n", ans);
  return 0;
}
