#include using namespace std; #define rep(i,N) for(i=0;i>N>>M; ll ans=0; for(ll i=N;N-500<=i&&1<=i;i--){ ll sum=0; for(ll j=1;j<=M;j++)sum+=i%j; ans=max(ans,sum); } cout<