#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define ld long double
#define pii pair<int,int>
#define vi vector<int>
#define si set<int>
#define qi queue<int>
#define sti stack<int>
#define fi first
#define se second
#define pb push_back
#define clr(f,n) memset(f,0,sizeof(int)*(n))
#define cpy(f,g,n) memcpy(f,g,sizeof(int)*(n))
const int N=50000+5;
ll S(int x){
return 1ll*x*(x+1)/2;
}
int main(){
freopen ("sumd.in","r",stdin);
freopen ("sumd.out","w",stdout);
ll n,k;scanf("%lld%lld",&n,&k);ll ans=n*k;
for (int l=1,r;l<=n;l=r+1){
if (k/l)r=min(n,k/(k/l));
else break;
ans-=(S(r)-S(l-1))*(k/l);
}
printf("%lld\n",ans);
return 0;
}