#include #include #include #include #include #include int main() { long long n, l; std::vector is_prime(5000001, true); long long count = 0; std::cin >> n >> l; is_prime[0] = is_prime[1] = false; for (int p = 2; p <= l; ++p) { if (is_prime[p]) { for (int k = 2; k * p <= l; ++k) { is_prime[k * p] = false; } count += std::max(0LL, l - (n - 1) * p + 1); } } std::cout << count << std::endl; return 0; }