【代码】
#include<bits/stdc++.h>
#define LL long long
using namespace std;
int main() {
LL n, k, t, ans;
#define LL long long
scanf("%lld%lld", &n, &k);
ans = (LL) n * k;
for(LL l = 1,r; l <= n;l = r + 1) {
r = (t = k / l) ? min(k / t, n) : n;
ans = (ans - (r - l + 1) * t * (l + r) / 2);
}
printf("%lld\\n", ans);
return 0;
}