def main():

    n = int(eval(input()))

    ans = 0

    cnt = 0

    for i in range(1,n):

        if n%i==0:

            ans+=n//i-1

        else:

            ans+=n//i

        if i**2<n:

            cnt+=1

    print(ans)

main()
def main():

    n = int(eval(input()))

    ans = 0

    for i in range(1,n):

        if n%i==0:

            ans+=n//i-1

        else:

            ans+=n//i

    print(ans)

main()
def main():
    n = int(eval(input()))
    ans = 0
    cnt = 0
    for i in range(1, n):
        if n % i == 0:
            ans += n // i - 1
        else:
            ans += n // i
        if i**2 < n:
            cnt += 1
    print(ans)


main()

def main():
    n = int(eval(input()))
    ans = 0
    for i in range(1, n):
        if n % i == 0:
            ans += n // i - 1
        else:
            ans += n // i
    print(ans)


main()

-    cnt = 0 -        if i**2 < n: -            cnt += 1