#include <bits/stdc++.h>
using namespace std;
const int N = 1e7 + 5;
int sqf[N], rt[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 1; i < N; i++) sqf[i] = i, rt[i] = 1;
  for (int i = 2; i * i < N; i++)
    for (int j = i * i; j < N; j += i * i)
      while (sqf[j] % (i * i) == 0) sqf[j] /= i * i, rt[j] *= i;
  int l, r, n;
  cin >> n >> l >> r;
  if (n <= 2) {
    int k = r - l + 1;
    if (n == 1)
      cout << k << endl;
    else
      cout << 1LL * k * (k - 1) << endl;
    return 0;
  }
  long long ans = 0;
  for (int ff = l; ff <= r; ff++) {
    int bs = sqf[ff];
    for (int i = 1; bs * i * i <= r; i++) {
      int ss = i * bs * rt[ff];
      if (ss <= ff) continue;
      long long cur = ss;
      bool bad = false;
      for (int i = 3; i <= n; i++) {
        cur *= ss;
        if (cur % ff) {
          bad = true;
          break;
        }
        cur /= ff;
        if (cur < l || cur > r) {
          bad = true;
          break;
        }
      }
      if (!bad) ans++;
    }
  }
  cout << ans * 2 << endl;
}
