fun main(args: Array<String>){
    val line: String = readLine() as String
    val nm=line.split(" ")
    val n = nm[0].toInt()
    val k = nm[1].toInt()
    var count:Long = 0
    for(b in k+1..n){
        count+=(n/b)*(b-k)
        if(n%b-k+1>0){
            count +=( n%b-k+1)
        }
    }
    if(k==0)count-=n
    print(count)
}