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

Ans = 0



if K == 0:

    print((N**2))

else:

    def Mods(i, N, K): #iで割った余りがK以上のN以下の数

        lim = N//i

        pattern = i - K

        total = lim * pattern

        if N - i * lim < K:

            return total

        else:

            extra = N - i * lim - K + 1

            return total + extra



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

        Ans += Mods(i, N, K)

    print(Ans)
import sys

from collections import deque



def solve():

    input = sys.stdin.readline

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

    Ans = 0

    if K == 0: print((N ** 2))

    else:

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

            Ans += (b - K) * (N // b)

            mod = N % b

            if mod >= K and mod > 0: Ans += mod - K + 1

        

        print(Ans)



    return 0



if __name__ == "__main__":

    solve()
N, K = list(map(int, input().split()))
Ans = 0
if K == 0:
    print((N**2))
else:

    def Mods(i, N, K):  # iで割った余りがK以上のN以下の数
        lim = N // i
        pattern = i - K
        total = lim * pattern
        if N - i * lim < K:
            return total
        else:
            extra = N - i * lim - K + 1
            return total + extra

    for i in range(K + 1, N + 1):
        Ans += Mods(i, N, K)
    print(Ans)

import sys
from collections import deque


def solve():
    input = sys.stdin.readline
    N, K = list(map(int, input().split()))
    Ans = 0
    if K == 0:
        print((N**2))
    else:
        for b in range(K + 1, N + 1):
            Ans += (b - K) * (N // b)
            mod = N % b
            if mod >= K and mod > 0:
                Ans += mod - K + 1
        print(Ans)
    return 0


if __name__ == "__main__":
    solve()

-N, K = list(map(int, input().split())) -Ans = 0 -if K == 0: -    print((N**2)) -else: +import sys +from collections import deque -    def Mods(i, N, K):  # iで割った余りがK以上のN以下の数 -        lim = N // i -        pattern = i - K -        total = lim * pattern -        if N - i * lim < K: -            return total -        else: -            extra = N - i * lim - K + 1 -            return total + extra -    for i in range(K + 1, N + 1): -        Ans += Mods(i, N, K) -    print(Ans) +def solve(): +    input = sys.stdin.readline +    N, K = list(map(int, input().split())) +    Ans = 0 +    if K == 0: +        print((N**2)) +    else: +        for b in range(K + 1, N + 1): +            Ans += (b - K) * (N // b) +            mod = N % b +            if mod >= K and mod > 0: +                Ans += mod - K + 1 +        print(Ans) +    return 0 + + +if __name__ == "__main__": +    solve()