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;
namespace math {
template <typename V = int>
inline void slightFixModInline(V& v, const V& mod) {
  if (v < 0) {
    v += mod;
  }
  if (v >= mod) {
    v -= mod;
  }
}
}  // namespace math
namespace math {
template <typename V = int>
inline void fixModInline(V& v, const V& mod) {
  slightFixModInline<V>(v, mod);
  if (v < 0 || mod <= v) {
    assert(mod);
    v %= mod;
    slightFixModInline<V>(v, mod);
  }
}
}  // namespace math
namespace math {
template <typename V = int>
inline V addMod(const V& a, V b, const V& mod) {
  V res = a;
  fixModInline<V>(res, mod);
  fixModInline<V>(b, mod);
  res += b;
  slightFixModInline<V>(res, mod);
  return res;
}
}  // namespace math
namespace math {
template <typename V = int32_t>
inline V extGcd(V a, V b, V& x, V& y) {
  bool negativeA = false;
  if (a < 0) {
    negativeA = true;
    a = -a;
  }
  bool negativeB = false;
  if (b < 0) {
    negativeB = true;
    b = -b;
  }
  x = 1;
  y = 0;
  V xTmp = 0;
  V yTmp = 1;
  while (b) {
    V q = a / b;
    tie(x, xTmp) = make_tuple(xTmp, x - q * xTmp);
    tie(y, yTmp) = make_tuple(yTmp, y - q * yTmp);
    tie(a, b) = make_tuple(b, a - q * b);
  }
  if (negativeA) {
    x = -x;
  }
  if (negativeB) {
    y = -y;
  }
  return a;
}
}  // namespace math
namespace math {
template <typename V = int32_t>
inline V invMod(V a, const V& mod) {
  V x0, x1, gcd = extGcd(a, mod, x0, x1);
  assert(gcd == 1);
  slightFixModInline(x0, mod);
  return x0;
}
}  // namespace math
namespace math {
template <typename V = int32_t, typename V_SQR = int64_t>
inline void mulModInline(V& res, V x, const V& mod) {
  if (!res || !x) {
    res = 0;
  } else if (res < mod / x) {
    res *= x;
  } else {
    res = static_cast<V_SQR>(res) * x % mod;
  }
}
}  // namespace math
namespace math {
template <typename V = int32_t, typename V_SQR = int64_t>
inline V mulMod(V a, const V& b, const V& mod) {
  mulModInline<V, V_SQR>(a, b, mod);
  return a;
}
}  // namespace math
namespace math {
struct CombinationMod {
  inline CombinationMod() {}
  inline CombinationMod(int n, int mod) { init(n, mod); }
  inline void init(int n, int mod) {
    _mod = mod;
    _facs.clear();
    _facs.reserve(n);
    int j = mod != 1;
    _facs.push_back(j);
    for (int i = 1; i < n; ++i) {
      _facs.push_back(mulMod(_facs.back(), j, mod));
      j = j + 1 == mod ? 0 : j + 1;
    }
    _invFacs.reserve(n);
    _invFacs.resize(n);
    _invFacs[n - 1] = invMod(_facs[n - 1], mod);
    for (int i = n - 1; i > 0; --i) {
      j = !j ? mod - 1 : j - 1;
      _invFacs[i - 1] = mulMod(_invFacs[i], j, mod);
    }
  }
  inline int calc(int n, int m) {
    if (n < m) {
      return 0;
    }
    return mulMod(mulMod(_facs[n], _invFacs[m], _mod), _invFacs[n - m], _mod);
  }
  int _mod;
  vector<int> _facs, _invFacs;
};
}  // namespace math
namespace math {
template <typename V = int32_t, typename EXP = int32_t,
          typename V_SQR = int64_t>
inline V expMod(V base, EXP exp, const V& mod) {
  V res = 1;
  for (; exp > 0; exp >>= 1) {
    if (exp & 1) {
      mulModInline<V, V_SQR>(res, base, mod);
    }
    mulModInline<V, V_SQR>(base, base, mod);
  }
  return res;
}
}  // namespace math
namespace math {
template <typename V = int32_t>
inline V fixMod(const V& v, const V& mod) {
  V res = v;
  fixModInline<V>(res, mod);
  return res;
}
}  // namespace math
namespace math {
template <typename V = int>
inline V subMod(const V& a, V b, const V& mod) {
  V res = a;
  fixModInline<V>(res, mod);
  fixModInline<V>(b, mod);
  if (res >= b) {
    res -= b;
  } else {
    res = mod - (b - res);
  }
  slightFixModInline<V>(res, mod);
  return res;
}
}  // namespace math
namespace math {
namespace {
struct _FibPartMod {
  inline _FibPartMod() {}
  inline _FibPartMod(int a_, int b_, int mod) { init(a_, b_, mod); }
  inline void init(int a_, int b_, int mod) {
    _mod = mod;
    a = fixMod(a_, mod);
    b = fixMod(b_, mod);
  }
  inline void init(const _FibPartMod& o) { init(o.a, o.b, o._mod); }
  inline void operator-=(const _FibPartMod& o) {
    a = subMod(a, o.a, _mod);
    b = subMod(b, o.b, _mod);
  }
  inline void operator+=(const _FibPartMod& o) {
    a = addMod(a, o.a, _mod);
    b = addMod(b, o.b, _mod);
  }
  inline void operator-=(int delta) {
    a = subMod(a, fixMod(delta, _mod), _mod);
  }
  inline void operator*=(const _FibPartMod& o) {
    int resA =
        addMod(mulMod(a, o.a, _mod),
               mulMod(mulMod(b, o.b, _mod), fixMod(5, _mod), _mod), _mod);
    int resB = addMod(mulMod(a, o.b, _mod), mulMod(b, o.a, _mod), _mod);
    a = resA;
    b = resB;
  }
  inline void operator*=(const int scale) {
    a = mulMod(a, fixMod(scale, _mod), _mod);
    b = mulMod(b, fixMod(scale, _mod), _mod);
  }
  int a, b;
  int _mod;
};
}  // namespace
struct FibPowerSum {
  inline FibPowerSum(int mod, int expBound = -1) { init(mod, expBound); }
  inline void init(int mod, int expBound = -1) {
    _five = fixMod(5, mod);
    _inv5 = invMod(_five, mod);
    _zeroPart.init(0, 0, mod);
    _onePart.init(fixMod(1, mod), 0, mod);
    int inv2 = invMod(2, mod);
    _mod = mod;
    if (expBound >= 0) {
      as_.reserve(expBound);
      bs_.reserve(expBound);
    }
    as_.clear();
    bs_.clear();
    as_.emplace_back(_onePart);
    bs_.emplace_back(_onePart);
    as_.emplace_back(inv2, inv2, mod);
    bs_.emplace_back(inv2, inv2 ? mod - inv2 : 0, mod);
    for (int i = 2; i < expBound; ++i) {
      as_.emplace_back(as_.back());
      as_.back() *= as_[1];
      bs_.emplace_back(bs_.back());
      bs_.back() *= bs_[1];
    }
    _comb.init(expBound, mod);
  }
  template <typename T>
  inline int calc(T n, int exp) {
    _res.init(_zeroPart);
    for (int i = 0; i <= exp; ++i) {
      _base.init(as_[i]);
      _base *= bs_[exp - i];
      if (_base.a == 1 && !_base.b) {
        _subRes.init(static_cast<int>(fixMod<T>(n + 1, _mod)), 0, _mod);
      } else {
        _mul.init(_base);
        _subRes.init(_onePart);
        for (T tmpN = n + 1; tmpN; tmpN >>= 1) {
          if (tmpN & 1) {
            _subRes *= _mul;
          }
          _mul *= _mul;
        }
        _subRes -= 1;
        _base -= 1;
        int scale =
            subMod(mulMod(_base.a, _base.a, _mod),
                   mulMod(mulMod(_base.b, _base.b, _mod), _five, _mod), _mod);
        _subRes *= invMod(scale, _mod);
        _base.b = _base.b ? _mod - _base.b : 0;
        _subRes *= _base;
      }
      _subRes *= _comb.calc(exp, i);
      if ((exp - i) & 1) {
        _res -= _subRes;
      } else {
        _res += _subRes;
      }
    }
    return mulMod((exp & 1) ? _res.b : _res.a, expMod(_inv5, exp >> 1, _mod),
                  _mod);
  }
  vector<_FibPartMod> as_, bs_;
  CombinationMod _comb;
  _FibPartMod _zeroPart, _onePart, _res, _base, _mul, _subRes;
  int _inv5, _five, _mod;
};
}  // namespace math
namespace math {
struct StirlingFirst {
  inline StirlingFirst(int n, int mod) { init(n, mod); }
  inline void init(int n, int mod) {
    _mod = mod;
    _us.resize(n);
    int one = fixMod(1, mod);
    if (n > 0) {
      _us[0].assign(1, one);
    }
    for (int i = 1; i < n; ++i) {
      _us[i].resize(i + 1);
      _us[i][0] = 0;
      int i1 = fixMod(i - 1, mod);
      for (int j = 1; j < i; ++j) {
        _us[i][j] =
            addMod(mulMod(i1, _us[i - 1][j], mod), _us[i - 1][j - 1], mod);
      }
      _us[i][i] = one;
    }
  }
  inline int calcUnsigned(int n, int k) { return n >= k ? _us[n][k] : 0; }
  inline int calcSigned(int n, int k) {
    int res = calcUnsigned(n, k);
    if (res && ((n - k) & 1)) {
      res = _mod - res;
    }
    return res;
  }
  vector<vector<int>> _us;
  int _mod;
};
}  // namespace math
const int MOD = 1000000007;
const int MAXEXP = 200 + 1;
math::FibPowerSum fibPowSum(MOD, MAXEXP);
math::StirlingFirst stirling(MAXEXP, MOD);
inline int calc(int exp, long long n) {
  int res = 0;
  for (int i = 0; i <= exp; ++i) {
    res = math::addMod(
        res,
        math::mulMod(stirling.calcSigned(exp, i), fibPowSum.calc(n, i), MOD),
        MOD);
  }
  res = math::mulMod(res, fibPowSum._comb._invFacs[exp], MOD);
  return res;
}
int main() {
  int exp;
  long long lower, upper;
  scanf("%d%lld%lld", &exp, &lower, &upper);
  printf("%d\n", math::subMod(calc(exp, upper + 2), calc(exp, lower + 1), MOD));
  return 0;
}