#include using namespace std; using i64 = long long; #define rep(i,s,e) for(i64 (i) = (s);(i) < (e);(i)++) #define all(x) x.begin(),x.end() template static inline std::vector ndvec(size_t&& n, T val) noexcept { return std::vector(n, std::forward(val)); } template static inline auto ndvec(size_t&& n, Tail&&... tail) noexcept { return std::vector(tail)...))>(n, ndvec(std::forward(tail)...)); } template struct chain { Cond cond; chain(Cond cond) : cond(cond) {} bool operator()(T& a, const T& b) const { if(cond(a, b)) { a = b; return true; } return false; } }; template chain make_chain(Cond cond) { return chain(cond); } int main() { i64 L, R; cin >> L >> R; std::vector cost(R + 1, 1); rep(i,L,R + 1) { for(int j = i + i; j < R + 1; j += i) { cost[j] = 0; } } i64 ans = 0; rep(i,L + 1, R + 1) { ans += cost[i]; } std::cout << ans << '\n'; }