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

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