#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
const int maxn = 3e5 + 50;
const int Mod = 1000000007;
const double PI = acos(-1);
using namespace std;
long long pows[maxn];
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long qPow(long long x, long long n) {
  long long ret = 1;
  while (n) {
    if (n & 1) ret = ret * x;
    if (x > 1e8 || ret > 1e8) return INF;
    x = x * x;
    n >>= 1;
  }
  return ret;
}
int main() {
  int n, l, r;
  while (~scanf("%d %d %d", &n, &l, &r)) {
    long long ans = 0;
    if (n == 1)
      ans = r - l + 1;
    else if (n == 2)
      ans = (long long)(r - l + 1) * (r - l);
    else {
      int lim = (int)(exp((long double)log(r) / (n - 1)) + 10);
      for (int i = 1; i <= lim; i++) {
        pows[i] = qPow(i, n - 1);
      }
      for (int i = 1; i < lim; i++)
        for (int j = i + 1; j < lim; j++) {
          if (gcd(i, j) == 1) {
            if (l * pows[j] / pows[i] > r) continue;
            long long tmp = r / pows[j] - (l - 1) / pows[i];
            if (tmp > 0) ans += tmp;
          }
        }
      ans <<= 1;
    }
    cout << ans << endl;
  }
  return 0;
}
