#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; const int dy[]={0,1,0,-1}; const int dx[]={1,0,-1,0}; int main(){ ll N,M; cin>>N>>M; ll ans=0; ll x=min(N,M-1); for(int i=1;i<=M;i++){ ans+=x%i; } cout<