fun main(args: Array<String>) {
    val (N, K) = listOfLong()
    if (K == 0L) {
        println(N * N)
        return
    }
    var ans = 0L
    for (b in K + 1..N) {
        val p = N / b
        val r = N % b
        val k = Math.max(b - K, 0) * p + Math.max(r - K + 1, 0)
        ans += k
    }
    println(ans)
}

fun next() = readLine()!!
fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun listOfString() = next().split(" ")
fun listOfInt(d: Int = 0) = listOfString().map { it.toInt() + d }
fun listOfLong(d: Long = 0) = listOfString().map { it.toLong() + d }
