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

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

long calc(long n, long k) {
    if (k == 0) return n * n;

    long ans = 0;
    for (int b = 1; b <= n; b++) {
        // N = pb + r
        long p = n / b;
        long r = n % b;

        long x = max(b - k, 0) * p + max(r - k + 1, 0);
        ans += x;
    }
    return ans;
}

void main() {
    auto nk = readints;
    int n = nk[0], k = nk[1];
    writeln(calc(n, k));
}
