fun main(args: Array<String>) {
    val (n,k)= readLine()!!.split(" ").map { it.toInt() }

    if(k==0){
        println(n*n.toLong())
        return
    }

    val ans = (1L..n).map { b ->
        n/b*Math.max(0,b-k) + Math.max(0,n%b-k+1)
    }.sum()

    println(ans)
}