import std.stdio;
import std.range;
import std.array;
import std.string;
import std.conv;
import std.typecons;
import std.algorithm;
import std.container;
import std.typecons;
import std.random;
import std.csv;
import std.regex;
import std.math;
import core.time;
import std.ascii;
import std.digest.sha;
import std.outbuffer;
import std.numeric;

void main()
{
	int n, k;
	readln.chomp.split.tie(n, k);
	long cnt = 0;
	debug {
		int ans = 0;
		/+
		for (int a = 1; a <= n; ++a) {
			for (int b = 1; b <= n; ++b) {
				if (a % b >= k) {
					verbose(a, b);
					++ans;
				}
			}
		}
		+/
		for (int b = 1; b <= n; ++b) {
			for (int a = b + 1; a <= n; ++a) {
				if (a % b >= k) {
					verbose(a, b, "...", a % b);
					++ans;
				}
			}
		}
		for (int a = 1; a <= n; ++a) {
			for (int b = a + 1; b <= n; ++b) {
				if (a % b >= k) {
					verbose(a, b, "...", a % b);
					++ans;
				}
			}
		}
		verbose("ans", ans);
	}
	// 上 (a <= b)
	for (int a = max(k, 1); a <= n; ++a) {
		cnt += n - a;
	}
	debug verbose("ue", cnt);
	// 下 (a > b)
	for (int b = k + 1; b <= n; ++b) {
		if (k == 0) {
			cnt += n - b + 1;
		} else {
			// cnt += (n - b) / k;
			debug verbose(b);
			for (int d = 0; d < b - k; ++d) {
				if (n < k + b + d) {
					break;
				}
				int v = (n - (k + b + d)) / b + 1;
				debug verbose("\t", d, v);
				if (v <= 0) {
					break;
				}
				cnt += v;
			}
		}
	}
	cnt.writeln;
}

void tie(R, Args...)(R arr, ref Args args)
		if (isRandomAccessRange!R || isArray!R)
in
{
	assert (arr.length == args.length);
}
body
{
	foreach (i, ref v; args) {
		alias T = typeof(v);
		v = arr[i].to!T;
	}
}

void verbose(Args...)(in Args args)
{
	stderr.write("[");
	foreach (i, ref v; args) {
		if (i) stderr.write(", ");
		stderr.write(v);
	}
	stderr.writeln("]");
}
