#include <bits/stdc++.h>
using ll = long long;
using pii = std::pair<ll, ll>;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll N, L, R;
int main(int argc, char** argv) {
  std::ios_base::sync_with_stdio(false);
  std::cin >> N >> L >> R;
  if (N == 1) {
    std::cout << R - L + 1 << std::endl;
    return 0;
  } else if (N == 2) {
    std::cout << (ll)(R - L + 1) * (R - L) << std::endl;
    return 0;
  } else if (N >= 30) {
    std::cout << 0 << std::endl;
    return 0;
  }
  std::vector<ll> pow{0};
  std::vector<ll> base{0};
  std::vector<ll> high{0};
  for (ll n = 1; n <= R; ++n) {
    ll v = 1;
    for (ll k = 0; k < N - 1; ++k) v *= n;
    if (v > R) break;
    pow.push_back(v);
    ll x = L / v;
    if (x * v < L) ++x;
    assert(x * v >= L);
    base.push_back(x);
    ll y = R / v;
    assert(x * v <= R);
    high.push_back(y);
  }
  ll total = 0;
  for (ll i = 1; i < pow.size(); ++i) {
    for (ll j = i + 1; j < pow.size(); ++j) {
      if (gcd(j, i) != 1) continue;
      total += std::max(high[j] - base[i] + 1, 0LL);
    }
  }
  std::cout << 2 * total << std::endl;
}
