#include using namespace std; int main() { long long L,R; cin >> L >> R; vectortmp(R-L+1); for(long long j = L; j <= R; j++) { tmp[j-L] = j; } vectorused(R-L+1); for(long long i = 2; i <= 1000000; i++) { for(long long j = (L+i-1)/i*i; j <= R; j += i) { int cnt = 0; while (tmp[j-L]%i == 0) { tmp[j-L] /= i; cnt++; } if(cnt >= 2) { used[j-L] = true; } } } int ans = 0; for(long long i = L; i <= R; i++) { if(!used[i-L]) { long long l = 1,r = 1001001001; while (l+1 < r) { long long mid = (l+r)/2; if(mid*mid >= tmp[i-L]) { r = mid; } else { l = mid; } } if(r*r != tmp[i-L]) { ans++; } } } cout << ans << endl; }