#include #define rep(i, l, r) for (int i = (l); i < (r); i++) using namespace std; typedef long long ll; int main() { ll L, R; cin >> L >> R; set st; rep(i, 0, R - L + 1) st.insert(i + L); rep(i, 2, 1e6) { ll x = 1LL * i * i; for (ll j = max(L / x * x, x); j <= R; j += x) { //cout << j << endl; st.erase(j); //for (auto k : st) cout << k << " "; cout << endl; } } rep(i, 1, 1e6) { ll x = sqrt(R / i); if (x == 1) continue; st.erase(x * x * i); } cout << st.size() << endl; }