#include <bits/stdc++.h>
using namespace std;
long long n, l, r, i, ans, pre[11111111];
bool pdd[11111111];
int main() {
  scanf("%lld%lld%lld", &n, &l, &r);
  if (n == 1) {
    printf("%lld\n", r - l + 1);
    return 0;
  } else if (n == 2) {
    printf("%lld\n", (r - l + 1) * (r - l));
    return 0;
  }
  bool pd = true;
  memset(pdd, true, sizeof(pdd));
  for (i = 2; i <= r; i++) {
    long long cur = 1;
    for (int j = 1; j <= n - 1; j++) {
      cur = cur * i;
      if (cur > r) {
        pd = false;
        break;
      }
    }
    if (!pd) break;
    pre[cur]++;
    for (long long j = 1; cur * j <= (r >> 2); j++) {
      if (cur * j > r) break;
      pdd[cur * j] = false;
    }
  }
  pre[1]++;
  for (i = 1; i <= r; i++) {
    pre[i] = pre[i - 1] + pre[i];
  }
  ans = 0;
  for (i = 1; i <= r / 4; i++)
    if (pdd[i]) {
      long long w = pre[r / i] - pre[(l - 1) / i];
      ans += w * (w - 1);
    }
  printf("%lld\n", ans);
}
