fun main(args: Array<String>) {
    arc091d()
}

fun arc091d() {
    val (n, k) = readLine()!!.split(' ').map { it.toLong() }

    if (k==0L) return println(n*n)
    
    var answer = 0L

    for (b in k + 1..n) {
        answer += (n / b) * (b - k) + max((n % b) - (k - 1), 0)
    }

    println(answer)
}

private fun max(a: Long, b: Long) = Math.max(a, b)
