#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  ios::sync_with_stdio(NULL);
  cin.tie(0);
  int n, l, r;
  cin >> n >> l >> r;
  int64_t ans = 0;
  if (n == 1) {
    cout << r - l + 1 << '\n';
    return 0;
  }
  if (n == 2) {
    cout << (r - l + 1) * int64_t(r - l) << '\n';
    return 0;
  }
  for (int den = 1; true; den++) {
    int denn = 1;
    bool ok = true;
    for (int j = 0; j < n - 1; j++) {
      if (denn > r / den) {
        ok = false;
        break;
      }
      denn *= den;
    }
    if (not ok) break;
    for (int num = den + 1; true; num++) {
      if (gcd(num, den) != 1) continue;
      int fb = denn;
      int lb = 1;
      bool ok = true;
      for (int j = 0; j < n - 1; j++) {
        if (lb > r / num) {
          ok = false;
          break;
        }
        lb *= num;
      }
      if (not ok) break;
      int m0 = (l + fb - 1) / fb;
      int m1 = r / lb;
      if (m0 > m1) break;
      ans += 2 * (m1 - m0 + 1);
    }
  }
  cout << ans << '\n';
  return 0;
}
