import std.stdio;
import std.conv;
import std.string;
import std.algorithm;
import std.range;
import std.functional;
import std.math;
import core.bitop;

void main()
{
    auto input = readln.chomp.split(' ').to!(long[]);
    long N = input[0];
    long K = input[1];

    long ans;

    foreach (i; K + 1 .. N + 1)
    {
        //writeln("i=", i);
        long a = N / i;
        long b = i - K;

        long c = N % i - K + 1;

        //writeln("a=", a, ",b=", b, ",c=", c);

        ans += a * b;
        if (0 < c)
            ans += c;
        if (K == 0)
            ans--;
    }
    ans.writeln;
}
