#include using namespace std; int N, L; vector prime; int setPrime(int n){ prime.resize(n+1); prime.assign(n+1, 1); prime[0] = 0; prime[1] = 0; prime[2] = 1; for(int i=2; i<=n; ++i){ if(prime[i]==1){ int j=i*2; while(j<=n){ prime[j] = 0; j += i; } } } } int main(){ cin >> N >> L; setPrime(L); unsigned long long int count = 0; for(int i=0; i<=L; ++i){ if(prime[i]){ if((N-1)*i<=L){ count += L - ((N-1)*i) + 1; } } } cout << count << endl; return 0; }