#include using namespace std; typedef long long ll; #define int ll const int N=2e6+7; int n,m,res=0,pr[N],tot=0; bitset<10000007>vis; signed main(){ cin>>n>>m; vis[0]=vis[1]=1; for(int i=2;i<=m;i++){ if(!vis[i])pr[++tot]=i; for(int j=1;j<=tot&&pr[j]*i<=m;j++){ vis[pr[j]*i]=1; if(i%pr[j]==0)break; } } for(int i=1;i<=tot;i++){ if(m-pr[i]*(n-1)<0)continue; res+=max(0ll,m-pr[i]*(n-1))+1; } cout<