#include using namespace std; #define rep(i,N) for(i=0;i>N>>M; vector is_prime(200009,1); vectorprime; for(ll i=2;i<200009;i++){ if(is_prime[i]==0)continue; prime.push_back(i); for(ll j=i+i;j<200009;j+=i)is_prime[j]=0; } ll now=0; ll ans=0; for(ll i=1;i<=N;i++){ now+=M; ll erase=1; ll k=i; rep(j,prime.size()){ ll mul=1; ll power=1; while(k%prime[j]==0){ k/=prime[j]; power*=prime[j]; mul+=power; } erase*=mul; if(k==1)break; } now-=erase; ans=max(ans,now); } cout<