#include <cstdio>
#define int long long
template < typename T>
inline T getmin(T x, T y) { return x > y ? y : x; }
signed main() {
long long n, k, ans = 0;
scanf("%lld %lld", &n, &k);
for (long long l = 1, r = 0, t; l <= n; l = r + 1) r = (t = k / l) ? getmin(k / t, n) : n, ans -= t * (r - l + 1) * (l + r) >> 1;
printf("%lld\n", ans = ans + n * k);
}