import std.stdio;
import std.string;
import std.conv;

void main()
{
	auto input = split( readln() );
	int N = to!int(input[0]), K = to!int(input[1]);
	
	
	int cnt = 0;
	int b = K+1;
	while ( b <= N ) {
		cnt += (b-K) * (N/b);
		int s = N%b - K + 1;
		if (s >= 0) { cnt += s; }
		if (K == 0) { cnt -= 1; }
		b += 1;
	}
	
	writeln(cnt);
}