program arc091_d
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: n,k,b,ans=0

    read*, n,k

    do b = k+1,n
        ans=ans+(n/(b)*(b-k))+max((n-((n/b)*b+k)+1),0)
    end do
    if (k==0) ans=ans-n
    print'(i0)', ans
end program arc091_d