#include <bits/stdc++.h>
using namespace std;
int N, L, R, W;
const int maxsqrtn = 3165;
int pow(int b, int e) {
  long long _b = b, r = 1;
  while (e) {
    if (e & 1) {
      r = r * _b;
    }
    if (_b >= R || r >= R) return -1;
    e >>= 1;
    _b = _b * _b;
  }
  return (int)r;
}
int gcd(int a, int b) {
  while (b) a %= b, swap(a, b);
  return a;
}
int main() {
  cin >> N >> L >> R;
  R++;
  W = R - L;
  if (N == 1) {
    cout << W << endl;
    return 0;
  }
  if (N == 2) {
    cout << (1LL * W * (W - 1)) << endl;
    return 0;
  }
  vector<pair<int, int> > intervals;
  for (int d = 1, p = pow(d, N - 1); p != -1; p = pow(++d, N - 1)) {
    int lo = (L + p - 1) / p;
    int hi = (R + p - 1) / p;
    intervals.emplace_back(lo, hi);
  }
  long long ret = 0;
  int sz = intervals.size();
  for (int i = 0; i < sz; i++) {
    for (int j = 0; j < sz; j++) {
      if (i == 0 && j == 0) continue;
      int d = gcd(i + 1, j + 1);
      if (d != 1) continue;
      int inter = min(intervals[i].second - intervals[j].first,
                      intervals[j].second - intervals[i].first);
      if (inter > 0) {
        ret += 1LL * inter;
      }
    }
  }
  cout << ret << endl;
  return 0;
}
