#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long expr(long long n, long long e) {
  if (e == 0) return 1;
  if (e & 1) {
    return n * expr(n, e ^ 1);
  } else
    return expr(n, e >> 1) * expr(n, e >> 1);
}
int main() {
  long long n, l, r;
  scanf("%lld %lld %lld", &n, &l, &r);
  long long count = 0;
  long long root = 0.000001 + pow((double)r, 1.0 / ((double)n - 1.0));
  if (n == 1) {
    printf("%lld\n", r - l + 1);
    return 0;
  }
  if (n == 2) {
    printf("%lld\n", (r - l + 1) * (r - l));
    return 0;
  };
  for (long long i = 1; i <= root; i++) {
    for (long long j = i + 1; j <= root; j++) {
      if (gcd(i, j) == 1) {
        long long maxb = r / expr(j, n - 1);
        long long minb = ceil((double)l / (double)expr(i, n - 1));
        ;
        count += max(0ll, maxb - minb + 1);
      }
    }
  }
  printf("%lld\n", 2 * count);
  return 0;
}
