object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n, k = sc.nextInt()

  if (k == 0) {
    println(n.toLong * n)
  } else {
    var ans = 0L
    for (b <- k+1 to n) {
      ans += ((n - k + 1) / b) * (b-k)
      ans += ((n - k + 1) % b).min(b-k)
    }
    println(ans)
  }
}
