object Main extends App {
  
  val In = io.StdIn.readLine()
  val A = In.split(" ")
  val N: Int = A(0).toInt
  val K: Int = A(1).toInt
  var sum: Int = 0

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

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

  print(sum)

}
