#include <bits/stdc++.h>
using namespace std;
int n, l, r;
long long ans = 0;
inline int gcd(int a, int b) {
  if (!a) return b;
  return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  cin >> n >> l >> r;
  if (n == 1) return cout << r - l + 1, 0;
  if (n == 2) return cout << (long long)(r - l + 1) * (r - l), 0;
  if (n > 30) return cout << 0, 0;
  for (int y = 1; y <= r; y++) {
    long long ydegn = 1;
    for (int i = 1; i < n; i++) ydegn *= y;
    if (ydegn > r) break;
    for (int x = y + 1; x <= r; x++) {
      if (gcd(x, y) == 1) {
        long long xdegn = 1;
        for (int i = 1; i < n; i++) xdegn *= x;
        if (xdegn > r) break;
        ans += max((long long)0, r / xdegn - (l - 1) / ydegn);
      }
    }
  }
  cout << ans * 2;
  return 0;
}
