#include <stdio.h>
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define MIN(a, b) ((a) < (b) ? (a) : (b))
typedef long long Int;
int main() {
    Int n, k;
    scanf("%lld %lld", &n, &k);
    if (k == 0) {
        printf("%lld\n", n * n);
        return 0;
    }
    Int ans = 0;
    for (Int b = k + 1; b <= n; b++) {
        Int q = n / b;
        Int r = n % b;
        Int c = 0;
        if (q >= 1) {
            c += (q - 1) * k + (k - 1);
        }
        c += MIN(r, k - 1) + 1;
        ans += n - c;
    }
    printf("%lld\n", ans);
}
