import sys

input = sys.stdin.readline

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

res = 0

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

  res += (N // x) * (x - K) + max(0, N % x - K + (K > 0))

  #print(x, res)

print(res)
import sys

input = sys.stdin.readline

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

if K == 0:

  print((N ** 2))

  exit(0)

res = 0

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

  if i <= K: continue

  res += i - K

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

    res += min(N + 1, j + i) - min(N + 1, j + K)

print(res)
import sys

input = sys.stdin.readline
N, K = list(map(int, input().split()))
res = 0
for x in range(K + 1, N + 1):
    res += (N // x) * (x - K) + max(0, N % x - K + (K > 0))
    # print(x, res)
print(res)

import sys

input = sys.stdin.readline
N, K = list(map(int, input().split()))
if K == 0:
    print((N**2))
    exit(0)
res = 0
for i in range(1, N + 1):
    if i <= K:
        continue
    res += i - K
    for j in range(i, N + 1, i):
        res += min(N + 1, j + i) - min(N + 1, j + K)
print(res)

+if K == 0: +    print((N**2)) +    exit(0) -for x in range(K + 1, N + 1): -    res += (N // x) * (x - K) + max(0, N % x - K + (K > 0)) -    # print(x, res) +for i in range(1, N + 1): +    if i <= K: +        continue +    res += i - K +    for j in range(i, N + 1, i): +        res += min(N + 1, j + i) - min(N + 1, j + K)