#include <bits/stdc++.h>
using namespace std;
long long int exponent_(long long int a, long long int x) {
  long long int ans = 1;
  while (x > 0) {
    if (x % 2 == 1) ans = (ans * a);
    x /= 2;
    a = (a * a);
  }
  return ans;
}
long long int gcd(long long int a, long long int b) {
  while (b) {
    long long int t = a % b;
    a = b;
    b = t;
  }
  return a;
}
int main() {
  long long int N, L, R;
  cin >> N >> L >> R;
  if (N == 1) {
    cout << (R - L + 1) << "\n";
    return 0;
  }
  if (N == 2) {
    cout << (R - L + 1) * (R - L) << "\n";
    return 0;
  }
  if (N > 50) N = 50;
  long long int ans = 0;
  long long int maxim = pow(R, 1.0 / (N - 1)) + 1;
  for (int x = 1; x <= maxim; x++) {
    for (int y = 1; y < x; y++) {
      if (gcd(x, y) != 1) continue;
      long long int xx = exponent_(x, N - 1);
      long long int yy = exponent_(y, N - 1);
      long long int small = (L - 1) / yy + 1;
      long long int big = R / xx;
      if (big >= small) {
        ans += big - small + 1;
      }
    }
  }
  cout << ans * 2LL << "\n";
  return 0;
}
