n,k = list(map(int,input().split()))



def main():

    ans = 0

    if k!= 0:

        for b in range(k+1,n+1):

            for q in range((n-k)//b+1):

                ans += min(b-k,n-b*q-k+1)

        print(ans)

        return

    else:

        print((n*n))

        return



if __name__ == "__main__":

    main()
def main():

    n,k = list(map(int,input().split()))

    s = 0

    if k==0:

        s = n*n

    else:

        for k_ in range(k,n):

            for q in range((n-k_)//(k_+1)+1):

                if q==0:

                    s += n-k_

                else:

                    s += (n-k_)//q-k_

    print(s)

            

if __name__ == "__main__":

    main()
n, k = list(map(int, input().split()))


def main():
    ans = 0
    if k != 0:
        for b in range(k + 1, n + 1):
            for q in range((n - k) // b + 1):
                ans += min(b - k, n - b * q - k + 1)
        print(ans)
        return
    else:
        print((n * n))
        return


if __name__ == "__main__":
    main()

def main():
    n, k = list(map(int, input().split()))
    s = 0
    if k == 0:
        s = n * n
    else:
        for k_ in range(k, n):
            for q in range((n - k_) // (k_ + 1) + 1):
                if q == 0:
                    s += n - k_
                else:
                    s += (n - k_) // q - k_
    print(s)


if __name__ == "__main__":
    main()

-n, k = list(map(int, input().split())) - - -    ans = 0 -    if k != 0: -        for b in range(k + 1, n + 1): -            for q in range((n - k) // b + 1): -                ans += min(b - k, n - b * q - k + 1) -        print(ans) -        return +    n, k = list(map(int, input().split())) +    s = 0 +    if k == 0: +        s = n * n -        print((n * n)) -        return +        for k_ in range(k, n): +            for q in range((n - k_) // (k_ + 1) + 1): +                if q == 0: +                    s += n - k_ +                else: +                    s += (n - k_) // q - k_ +    print(s)