#include using namespace std; vector primes; void sieve(long long n){ vector isPrime(n, true); isPrime[0] = false; isPrime[1] = false; long long maxn = sqrt(n); for(long long i = 2; i <= n; i++){ if(isPrime[i] == true){ primes.push_back(i); for(long long j = i * 2; j <= n; j += i){ isPrime[j] = false; } } } } int main(){ long long n, l; cin >> n >> l; sieve(l); long long count = 0; for(long long i = 0; i < primes.size(); i++){ // cout << primes[i] << endl; if(primes[i] * (n - 1) <= l){ count += (l + 1) - (primes[i] * (n - 1)); } } cout << count << endl; }