#include <bits/stdc++.h>
using namespace std;
int gcd[3200][3200];
int main() {
  std::ios_base::sync_with_stdio(false);
  int n, l, r;
  cin >> n >> l >> r;
  if (n == 1) {
    cout << r - l + 1;
    return 0;
  }
  if (n == 2) {
    cout << 1ll * (r - l + 1) * (r - l);
    return 0;
  }
  for (int i = (1); i < int(3200); i++) {
    for (int j = (1); j < int(i + 1); j++) {
      if (i % j == 0) {
        gcd[j][i] = gcd[i][j] = j;
      } else {
        gcd[j][i] = gcd[i][j] = gcd[j][i % j];
      }
    }
  }
  int s = pow(r, 1.0 / (n - 1));
  if (n - 1 <= 30) {
    long long t = 1;
    for (int i = 0; i < int(n - 1); i++) {
      t *= s + 1;
    }
    if (t <= r) {
      s++;
    }
  }
  long long ans = 0;
  for (int i = (1); i < int(s + 1); i++) {
    for (int j = (i + 1); j < int(s + 1); j++) {
      if (gcd[i][j] != 1) {
        continue;
      }
      int p = 1, q = 1, bi = i, bj = j, t = n - 1;
      while (t) {
        if (t & 1) {
          p *= bi;
          q *= bj;
        }
        bi *= bi;
        bj *= bj;
        t >>= 1;
      }
      ans += 2 * max(0, r / q - (l - 1) / p);
    }
  }
  cout << ans << endl;
  return 0;
}
