import sys



N, K = list(map(int, sys.stdin.readline().split()))



if K == 0:

    print((N*N))

    sys.exit()



# b は K 以上

# a は b * c + K <= a < b * (c+1)

ans = 0

for i in range(1, N+1):

    # print(N // i, (i - K), max(N % i - K, 0))

    tmp = (N // i) * max(i - K, 0) + max(N % i + 1 - K, 0)

    ans += tmp



print(ans)
import sys



N, K = list(map(int, sys.stdin.readline().split()))



if K == 0:

    print((N*N))

    sys.exit()



ans = 0

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

    r = N // b

    # tmp = (b - K) * r

    # tmp2 = (N % b + 1 - K)

    # print(b, tmp, tmp2)

    tmp = (b - K) * r + max(0, N % b + 1 - K)

    ans += tmp



print(ans)
import sys

N, K = list(map(int, sys.stdin.readline().split()))
if K == 0:
    print((N * N))
    sys.exit()
# b は K 以上
# a は b * c + K <= a < b * (c+1)
ans = 0
for i in range(1, N + 1):
    # print(N // i, (i - K), max(N % i - K, 0))
    tmp = (N // i) * max(i - K, 0) + max(N % i + 1 - K, 0)
    ans += tmp
print(ans)

import sys

N, K = list(map(int, sys.stdin.readline().split()))
if K == 0:
    print((N * N))
    sys.exit()
ans = 0
for b in range(K + 1, N + 1):
    r = N // b
    # tmp = (b - K) * r
    # tmp2 = (N % b + 1 - K)
    # print(b, tmp, tmp2)
    tmp = (b - K) * r + max(0, N % b + 1 - K)
    ans += tmp
print(ans)

-# b は K 以上 -# a は b * c + K <= a < b * (c+1) -for i in range(1, N + 1): -    # print(N // i, (i - K), max(N % i - K, 0)) -    tmp = (N // i) * max(i - K, 0) + max(N % i + 1 - K, 0) +for b in range(K + 1, N + 1): +    r = N // b +    # tmp = (b - K) * r +    # tmp2 = (N % b + 1 - K) +    # print(b, tmp, tmp2) +    tmp = (b - K) * r + max(0, N % b + 1 - K)