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+=(const int delta) {
    a = addMod(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) {
    int inv2 = invMod(2, mod);
    _mod = mod;
    if (expBound >= 0) {
      as_.reserve(expBound);
      bs_.reserve(expBound);
    }
    as_.clear();
    bs_.clear();
    as_.emplace_back(1, 0, mod);
    bs_.emplace_back(1, 0, mod);
    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);
    _inv5 = invMod(fixMod(5, mod), mod);
  }
  template <typename T>
  inline int calc(T n, int exp) {
    ++n;
    _FibPartMod res(0, 0, _mod), base, mul, subRes, subRes2;
    for (int i = 0; i <= exp; ++i) {
      T mask = 1;
      for (; mask <= n; mask <<= 1) {
      }
      base.init(as_[i]);
      base *= bs_[exp - i];
      mul.init(base);
      subRes.init(as_[0]);
      for (mask >>= 2; mask; mask >>= 1) {
        subRes2.init(subRes);
        subRes2 *= mul;
        subRes2 += subRes;
        mul *= mul;
        if (n & mask) {
          subRes2 *= base;
          subRes2 += 1;
          mul *= base;
        }
        subRes.init(subRes2);
      }
      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;
  int _inv5, _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) {
    int fibSum = fibPowSum.calc(n, i);
    res = math::addMod(
        res, math::mulMod(stirling.calcSigned(exp, i), fibSum, 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;
}