#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ll n,k,ans,l,r;
    cin>>n>>k;
    ans=n*k;
    for(l=1;l<=n;l=r+1)
    {
        if(l>k) break;
        r=k/(k/l);
        r=min(n,r);
        ans-=(l+r)*(k/l)*(r-l+1)/2;
    }
    cout<<ans<<endl;
    return 0;
}