import std.stdio, std.algorithm, std.string, std.conv, std.array, std.range, std.math, core.stdc.stdio;
int[] readints() { return readln.split.to!(int[]); }

long calc(long n, long k, long b) {
    long cnt = max(0, b - k);
    long p = n / b;
    long r = n - p * b;
    long x = max(0, r - k + 1);
    return p * cnt + x;
}

void main() {
    auto input = readints();
    long n = input[0], k = input[1];

    long ans;
    foreach (b; k+1..n+1)
        ans += calc(n, k, b);
    writeln(!k ? n * n : ans);
}