local n, k = io.read("*n", "*n")
local cnt = 0
local mm = math.max
for b = k + 1, n do
  cnt = cnt + (n // b) * (b - k)
  local rem = n % b
  if(0 < rem) then
    if(k == 0) then cnt = cnt + rem
    else cnt = cnt + mm(0, rem - k + 1)
    end
  end
end
print(cnt)
