#include <bits/stdc++.h>
using namespace std;
int p[100010];
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  int n, l, r, i, j;
  long long ans = 0;
  scanf("%d%d%d", &n, &l, &r);
  if (n > 30) {
    printf("0\n");
    return 0;
  }
  if (n == 1) {
    printf("%d\n", r - l + 1);
    return 0;
  }
  if (n == 2) {
    printf("%I64d\n", (long long)(r - l + 1) * (r - l));
    return 0;
  }
  p[1] = 1;
  for (i = 2; i * i <= r; i++) {
    int ok = 1;
    long long s = 1;
    for (j = 1; j < n; j++) {
      s *= i;
      if (s > r) {
        ok = 0;
        break;
      }
    }
    if (!ok) break;
    p[i] = s;
    for (j = 1; j < i; j++)
      if (gcd(i, j) == 1) {
        int ll = (l - 1) / p[j] + 1, rr = r / s;
        if (ll <= rr) ans += 2 * (rr - ll + 1);
      }
  }
  printf("%I64d\n", ans);
  return 0;
}
