import kotlin.math.max

fun intList() = readLine()?.split(" ")?.map(String::toInt) ?: TODO()
fun main() {
    val (n, k) = intList()
    var c = 0L
    if (k == 0) {
        println((n.toLong() * n.toLong()).toString())
        return
    }
    1.until(n + 1).forEach {
        val p = n / it
        val r = n % it
        c += max(0, it - k) * p + max(0, r - k + 1)
    }
    println(c.toString())
}
