import scala.io.StdIn.readLine

object Main extends App {
	val Array(n, k) = readLine().split(" ").map(_.toLong)

	def min0(x:Long) = if (x<0) 0 else x

	println((1.toLong to n).view.map(b => if (k < b) (n/b)*(b-k)+min0(n%b+1-k)-(if(k==0)1 else 0) else 0).sum)
}