#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const int inf=1<<30; const ll INF=1LL<<62; typedef pair P; typedef pair PP; const ll MOD=998244353; int main(){ ll N,M; cin>>N>>M; vector cand(N+1,0); vector minus(N+1,0); for(int x=1;x<=N;x++){ for(int y=x;y<=N;y+=x){ minus[y]-=x; } } ll ans=0; for(int x=1;x<=N;x++){ cand[x]+=M; cand[x]+=minus[x]; cand[x]+=cand[x-1]; ans=max(ans,cand[x]); } cout<