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

ans =0

if k==0:

    print((n**2))

    exit()

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

    ans+=(n//i)*(i-k) + max(0,n%i-k+1)

print(ans)
def solve():

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

    res = 0

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

        res+=(i-k)*(n//i)

        if n%i>=k:

            if k==0:

                res+=n%i

            else:

                res+=n%i-k+1

    print(res)

if __name__=='__main__':

    solve()
n, k = list(map(int, input().split()))
ans = 0
if k == 0:
    print((n**2))
    exit()
for i in range(k + 1, n + 1):
    ans += (n // i) * (i - k) + max(0, n % i - k + 1)
print(ans)

def solve():
    n, k = list(map(int, input().split()))
    res = 0
    for i in range(k + 1, n + 1):
        res += (i - k) * (n // i)
        if n % i >= k:
            if k == 0:
                res += n % i
            else:
                res += n % i - k + 1
    print(res)


if __name__ == "__main__":
    solve()

-n, k = list(map(int, input().split())) -ans = 0 -if k == 0: -    print((n**2)) -    exit() -for i in range(k + 1, n + 1): -    ans += (n // i) * (i - k) + max(0, n % i - k + 1) -print(ans) +def solve(): +    n, k = list(map(int, input().split())) +    res = 0 +    for i in range(k + 1, n + 1): +        res += (i - k) * (n // i) +        if n % i >= k: +            if k == 0: +                res += n % i +            else: +                res += n % i - k + 1 +    print(res) + + +if __name__ == "__main__": +    solve()