import std.stdio, std.algorithm, std.conv, std.array, std.range, std.string, std.math, std.typecons;

void main()
{
    auto nk = readln.split.to!(int[]);
    auto N = nk[0];
    auto K = nk[1];

    long cnt;
    foreach (long i; 0..N) {
        if (i < K)
            continue;
        else {
            cnt += N / (i+1) * (i+1-K);
            if (N % (i+1) >= K) cnt += N % (i+1) - K + 1;
            if (!K) cnt -= 1;
        }
    }
    writeln(cnt);
}