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;

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

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

        int 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));
}
