
import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val (N, K) = sc.nextLine().split(" ")
    val n = N.toLong()
    val k = K.toLong()

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

    var sum = 0L;
    for (b in (k + 1)..n) {
        sum += (n / b) * (b - k)
        val mod = n % b
        if (mod >= k) {
            sum += mod - k + 1
        }
    }
    println(sum)
}