object Main extends App {

  val In = io.StdIn.readLine()
  val A = In.split(" ")
  val N: Long = A(0).toLong
  val K: Long = A(1).toLong
  var sum: Long = 0

  if (K == 0) {
    sum = N * N
  } else {
    for (b <- K + 1 to N) {
      var p: Long = N / b
      val r: Long = N % b

      sum += p * (b - K)
      sum += (r - K + 1).max(0)
    }
  }

  print(sum)

}
