N, K = list(map(int, input().split()))

if K == 0:

    print((N * N))

    exit()

ans = 0

for b in range(K + 1, N + 1):

    p = N // b

    ans += p * max(0,b - K) + max(0, N - p * b - K + 1)

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

if k==0:

    print((n**2))

    exit()

ans=0

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

    p=n//i

    q=n%i

    ans +=p*max(0,i-k)+max(0,q-k+1)

print(ans)
N, K = list(map(int, input().split()))
if K == 0:
    print((N * N))
    exit()
ans = 0
for b in range(K + 1, N + 1):
    p = N // b
    ans += p * max(0, b - K) + max(0, N - p * b - K + 1)
print(ans)

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

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