import std.stdio,
       std.string,
       std.conv,
       std.algorithm;

void main() {
  long[] buf = readln.chomp.split.to!(long[]);
  long N = buf[0], K = buf[1];

  if (K == 0) {
    writeln(N * N);
    return;
  }
  long ans;
  for (int i = 1; i <= N; i++) {
    ans += max(0, (i - K) * (N / i));
    ans += max(0, (N % i) + (1 - K));
  }

  writeln(ans);
}
