import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array



# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall

# from decimal import Decimal

# from collections import defaultdict, deque



sys.setrecursionlimit(10000000)



ii = lambda: int(sys.stdin.buffer.readline().rstrip())

il = lambda: list(map(int, sys.stdin.buffer.readline().split()))

fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))

iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]



iss = lambda: sys.stdin.buffer.readline().decode().rstrip()

sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))

isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]



lcm = lambda x, y: (x * y) // math.gcd(x, y)



MOD = 10 ** 9 + 7

INF = float('inf')





def main():

    if os.getenv("LOCAL"):

        sys.stdin = open("input.txt", "r")



    N = ii()



    ret = 0

    for a in range(1, N):

        b = N // a

        if N - (a * b) <= 0:

            ret += b - 1

        else:

            ret += b

    print(ret)





if __name__ == '__main__':

    main()

import sys

import os

import math

import bisect

import itertools

import collections

import heapq

import queue

import array



# 時々使う

# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall

# from decimal import Decimal

# from collections import defaultdict, deque



# 再帰の制限設定

sys.setrecursionlimit(10000000)





def ii(): return int(sys.stdin.buffer.readline().rstrip())

def il(): return list(map(int, sys.stdin.buffer.readline().split()))

def fl(): return list(map(float, sys.stdin.buffer.readline().split()))

def iln(n): return [int(sys.stdin.buffer.readline().rstrip())

                    for _ in range(n)]





def iss(): return sys.stdin.buffer.readline().decode().rstrip()

def sl(): return list(map(str, sys.stdin.buffer.readline().decode().split()))

def isn(n): return [sys.stdin.buffer.readline().decode().rstrip()

                    for _ in range(n)]





def lcm(x, y): return (x * y) // math.gcd(x, y)





MOD = 10 ** 9 + 7

INF = float('inf')





def main():

    if os.getenv("LOCAL"):

        sys.stdin = open("input.txt", "r")



    N = ii()



    ret = 0

    for i in range(1, N):

        ret += (N - 1) // i

    print(ret)





if __name__ == '__main__':

    main()

import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array

# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
# from decimal import Decimal
# from collections import defaultdict, deque
sys.setrecursionlimit(10000000)
ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]
iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]
lcm = lambda x, y: (x * y) // math.gcd(x, y)
MOD = 10**9 + 7
INF = float("inf")


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")
    N = ii()
    ret = 0
    for a in range(1, N):
        b = N // a
        if N - (a * b) <= 0:
            ret += b - 1
        else:
            ret += b
    print(ret)


if __name__ == "__main__":
    main()

import sys
import os
import math
import bisect
import itertools
import collections
import heapq
import queue
import array

# 時々使う
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
# from decimal import Decimal
# from collections import defaultdict, deque
# 再帰の制限設定
sys.setrecursionlimit(10000000)


def ii():
    return int(sys.stdin.buffer.readline().rstrip())


def il():
    return list(map(int, sys.stdin.buffer.readline().split()))


def fl():
    return list(map(float, sys.stdin.buffer.readline().split()))


def iln(n):
    return [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]


def iss():
    return sys.stdin.buffer.readline().decode().rstrip()


def sl():
    return list(map(str, sys.stdin.buffer.readline().decode().split()))


def isn(n):
    return [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


MOD = 10**9 + 7
INF = float("inf")


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")
    N = ii()
    ret = 0
    for i in range(1, N):
        ret += (N - 1) // i
    print(ret)


if __name__ == "__main__":
    main()

-import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array +import sys +import os +import math +import bisect +import itertools +import collections +import heapq +import queue +import array +# 時々使う +# 再帰の制限設定 -ii = lambda: int(sys.stdin.buffer.readline().rstrip()) -il = lambda: list(map(int, sys.stdin.buffer.readline().split())) -fl = lambda: list(map(float, sys.stdin.buffer.readline().split())) -iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)] -iss = lambda: sys.stdin.buffer.readline().decode().rstrip() -sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split())) -isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)] -lcm = lambda x, y: (x * y) // math.gcd(x, y) + + +def ii(): +    return int(sys.stdin.buffer.readline().rstrip()) + + +def il(): +    return list(map(int, sys.stdin.buffer.readline().split())) + + +def fl(): +    return list(map(float, sys.stdin.buffer.readline().split())) + + +def iln(n): +    return [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)] + + +def iss(): +    return sys.stdin.buffer.readline().decode().rstrip() + + +def sl(): +    return list(map(str, sys.stdin.buffer.readline().decode().split())) + + +def isn(n): +    return [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)] + + +def lcm(x, y): +    return (x * y) // math.gcd(x, y) + + -    for a in range(1, N): -        b = N // a -        if N - (a * b) <= 0: -            ret += b - 1 -        else: -            ret += b +    for i in range(1, N): +        ret += (N - 1) // i