import java.util.Scanner

object Main {
  def solve(): Unit = {
    val sc = new Scanner(System.in)
    val N = sc.nextLong()
    val K = sc.nextLong()
    val sum = K match {
      case 0 => N * N
      case _ => ((K + 1 to N) map { b =>
        (N / b) * (b - K) + math.max(N % b - K + 1, 0)
      }).sum
    }
    println(sum)
  }

  def main(args: Array[String]): Unit = {
    solve()
  }
}
