#include <bits/stdc++.h>
template <class T>
inline void rd(T &x) {
  char c = getchar();
  x = 0;
  while (!isdigit(c)) c = getchar();
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
}
using namespace std;
const int N = 222;
const int M = 1e9 + 7;
using namespace std;
long long s[N][N];
long long qpow(long long a, long long k) {
  long long ret = 1;
  a %= M;
  if (a < 0) a += M;
  while (k) {
    if (k & 1) (ret *= a) %= M;
    (a *= a) %= M;
    k >>= 1;
  }
  return ret;
}
pair<long long, long long> mp(long long a, long long b) {
  a %= M, b %= M;
  if (a < 0) a += M;
  if (b < 0) b += M;
  return make_pair(a, b);
}
pair<long long, long long> operator*(pair<long long, long long> a,
                                     pair<long long, long long> b) {
  long long x = a.first * b.first % M + 5 * a.second * b.second % M;
  long long y = a.first * b.second % M + a.second * b.first % M;
  (x += 2 * M) %= M, (y += 2 * M) %= M;
  return make_pair(x, y);
}
pair<long long, long long> operator+(pair<long long, long long> a,
                                     pair<long long, long long> b) {
  long long x = (a.first + b.first) % M;
  long long y = (a.second + b.second) % M;
  return make_pair(x, y);
}
pair<long long, long long> operator-(pair<long long, long long> a,
                                     pair<long long, long long> b) {
  long long x = (a.first - b.first + M) % M;
  long long y = (a.second - b.second + M) % M;
  return make_pair(x, y);
}
pair<long long, long long> inv(pair<long long, long long> a) {
  pair<long long, long long> x =
      mp(qpow(((a.first) * (a.first)) % M - ((a.second) * (a.second)) % M * 5,
              M - 2),
         0);
  pair<long long, long long> y = mp(a.first, -a.second);
  return x * y;
}
pair<long long, long long> qpow(pair<long long, long long> a, long long k) {
  pair<long long, long long> ret = mp(1, 0);
  while (k) {
    if (k & 1) ret = ret * a;
    a = a * a;
    k >>= 1;
  }
  return ret;
}
long long ex[N], fex[N];
long long Ca(int n, int m) {
  if (m >= n) return 1;
  return ex[n] * fex[m] % M * fex[n - m] % M;
}
void show(pair<long long, long long> a) {
  cout << a.first * 2 % M << " " << a.second * 2 % M << endl;
}
void init() {
  s[0][0] = 1;
  for (int i = 1; i < N; i++) {
    s[i][0] = 0, s[i][i] = 1;
    for (int j = 1; j < i; j++)
      s[i][j] = (s[i - 1][j - 1] - (i - 1) * s[i - 1][j] % M + M) % M;
  }
  ex[0] = fex[0] = 1;
  for (int i = 1; i < N; i++) {
    ex[i] = ex[i - 1] * i % M;
    fex[i] = qpow(ex[i], M - 2);
  }
}
int main() {
  long long l, r;
  int k;
  init();
  pair<long long, long long> A, B, C, Aj;
  A = mp(1, 0) * inv(mp(0, 1));
  B = mp(1, 1) * inv(mp(2, 0));
  C = mp(1, -1) * inv(mp(2, 0));
  Aj = mp(1, 0);
  cin >> k >> l >> r;
  l += 2, r += 2;
  long long ans = 0;
  for (int j = 0; j < k + 1; j++) {
    long long temp = s[k][j];
    pair<long long, long long> tt = Aj;
    Aj = Aj * A;
    pair<long long, long long> sum = mp(0, 0);
    for (int t = 0; t < j + 1; t++) {
      pair<long long, long long> psum = make_pair(0, 0);
      pair<long long, long long> p = qpow(B, t) * qpow(C, j - t);
      if (p == mp(1, 0)) {
        psum = mp(r - l + 1, 0);
      } else {
        psum = (qpow(p, l) - qpow(p, r + 1)) * inv(mp(1, 0) - p);
      }
      psum = psum * mp(Ca(j, t), 0LL);
      if ((j - t) & 1)
        sum = sum - psum;
      else
        sum = sum + psum;
    }
    tt = tt * sum;
    temp = (temp * tt.first) % M;
    ans = (ans + temp) % M;
  }
  ans = ans * fex[k] % M;
  cout << ans << endl;
  return 0;
}
