import scala.io.{StdIn => in}

object Main extends App {
  val Array(n, k) = in.readLine.split(" ").map(_.toInt)

  val ans = 
    if (k == 0) n * n
    else (k+1L to n.toLong)./:(0L)( (acc, i) => {
      val p = n / i
      val r = n % i
      acc + (i-k) * p + ((r - k + 1) max 0)
    })
  println(ans)
}