CodeEff/ECCO huggingface dataset:
# Original solution
n = int(eval(input()))
cnt = 0

for i in range(1,n):
  for j in range(1,n//i+1):
    if i * j < n:
      cnt +=1
      
print(cnt)

# Optimized solution
n = int(eval(input()))
cnt = 0

for i in range(3,n):
  for j in range(1,n//i+1):
    if i * j < n:
      cnt +=1
      
print((cnt+n-1+(n-1)//2))
# Original solution
N = int(eval(input()))
count = 0
for i in range(1,N+1):
    for j in range(1,N+1):
        if i*j >= N:
            break
        else:
            count += 1
print(count)

# Optimized solution
N = int(eval(input()))
count = 0
flg = False
for i in range(1,N):

    count +=  int(N / i)
    if N% i == 0:
        count -=1
print(count)
# Original solution
N = int(eval(input()))
c = 0
for i in range(1,N):
  for j in range(1,N):
    if i*j >= N:
      break
    c += 1
print(c)

# Optimized solution
N = int(eval(input()))
c = 0
for i in range(1,N):
  if i**2 >= N:
    break
  c += 1
for i in range(1,N):
  for j in range(i+1,N):
    if i*j >= N:
      break
    c += 2
print(c)
# Original solution
N = int(eval(input()))

cnt = 0
for a in range(1, N):
    for b in range(1, N//a + 1):
        if a * b < N:
            cnt += 1

print(cnt)

# Optimized solution
N = int(eval(input()))

cnt = 0
for a in range(1, N):
    cnt += (N-1) // a

print(cnt)
# Original solution
N = int(eval(input()))

result = 0
for A in range(1, N + 1):
    for B in range(1, (N // A) + 1):
        C = N - A * B
        if C == 0:
            continue
        result += 1
print(result)


# Optimized solution
N = int(eval(input()))

result = 0
for A in range(1, N + 1):
    result += (N - 1) // A
print(result)
# Original solution
n = int(eval(input()))
a = 1
ans = 0

while a < n:
    b = 1
    while a * b < n:
        ans += 1
        b += 1
    a += 1

print(ans)

# Optimized solution
n = int(eval(input()))
a = 2
ans = 0
 
while a < n/2:
    b = 2
    while a * b < n:
        ans += 1
        b += 1
    a += 1
 
print((ans+2*(n-2)+1))
# Original solution
n = int(eval(input()))
a = 2
ans = 0
 
while a < n/2:
    b = 2
    while a * b < n:
        ans += 1
        b += 1
    a += 1
 
print((ans+2*(n-2)+1))

# Optimized solution
n = int(eval(input()))
a = 1
ans = 0
 
# while a < n/2:
#     b = 2
#     while a * b < n:
#         ans += 1
#         b += 1
#     a += 1
 
# print(ans+2*(n-2)+1)
for i in range(1,n):
    ans += (n-1)//i

print(ans)
# Original solution
#!python3

import sys
iim = lambda: list(map(int, sys.stdin.readline().rstrip().split()))

def get_factor(N):
    N1 = N + 2
    A = [2, 0] * (N1//2)

    for i in range(3, N1, 2):
        if A[i]:
            continue
        for j in range(i, N1, 2*i):
            A[j] = i

    def factor(n):
        i = 0
        ans = []

        while n & 1 == 0:
            i += 1
            n >>= 1
        if i:
            ans.append((2, i))

        while n > 1:
            a = A[n]
            i = 1
            while True:
                n //= a
                b = A[n]
                if a != b:
                    ans.append((a, i))
                    b = a
                    break
                i += 1

        return ans


    return factor

def resolve():
    N = int(sys.stdin.readline())

    f = get_factor(N)

    ans = 0
    for i in range(1, N):
        num = 1
        #print(i, f(i))
        for a, b in f(i):
            num *= b + 1
        ans += num
    print(ans)
if __name__ == "__main__":
    resolve()


# Optimized solution
#!python3

import sys
iim = lambda: list(map(int, sys.stdin.readline().rstrip().split()))

def resolve():
    N = int(sys.stdin.readline())
    N1 = N - 1

    ans = 0
    for i in range(1, N):
        ans += N1//i
    print(ans)
if __name__ == "__main__":
    resolve()
# Original solution
#ABC179 c
n = int(eval(input()))
count = 0
for i in range(1, n):
  a = n // i
  for j in range(1, a+1):
    if i * j < n:
      count += 1
print(count)

# Optimized solution
#ABC179 c
n = int(eval(input()))
count = 0
for i in range(1, n):
  a = n // i
  b = n % i
  if b==0:
    count += a-1
  else:
    count += a
print(count)
# Original solution
n = int(eval(input()))

ans = 0

for a in range(1, n):
	b = 1
	while a * b < n:
		ans += 1
		b += 1
print(ans)

# Optimized solution
n = int(eval(input()))

ans = 0

for a in range(1, n):
	if n % a == 0:
		ans += n // a - 1
	else:
		ans += n // a
print(ans)
# Original solution
n = int(eval(input()))

count = -1

for i in range(int(n/2)):
    for j in range(n-1):
        if (i+1)*(j+1) < n:
            count += 1
        else:
            break
count += n - int(n/2)
print(count)


# Optimized solution
n = int(eval(input()))

count = 0

if n%2==0:
    for i in range(int(n/2)-1):
        count += int((n-1)/(i+1))
    count += int(n/2)

else:
    for i in range(int(n/2)):
        count += int((n-1)/(i+1))
    count += int(n/2)

print(count)
# Original solution
n = int(eval(input()))
a = 1
b = 1
c = 1
cnt = 0
while n > a:
    while a * b < n:
        cnt += 1
        b += 1
    b = 1
    a += 1

print(cnt)

# Optimized solution
n = int(eval(input()))
a = 1
cnt = 0
while n > a:
    cnt += (n-1) // a
    a += 1

print(cnt)
# Original solution
from collections import Counter
class Prime:
    def __init__(self, N):
        smallestPrime = [i for i in range(N + 1)]

        for i in range(2, N + 1):
            if smallestPrime[i] != i:
                continue
            for p in range(i * 2, N + 1, i):
                if smallestPrime[p] == p:
                    smallestPrime[p] = i

        self.smallestPrime = smallestPrime

    def isPrime(self, n):
        return n > 1 and self.smallestPrime[n] == n

    def factorization(self, n):
        ret = Counter()
        while n > 1:
            p = self.smallestPrime[n]
            ret[p] += 1
            n //= p
        return ret

N = int(eval(input()))
prime = Prime(N + 100)

ans = 0
for c in range(1, N):
    cnt = 1
    for c in list(prime.factorization(N - c).values()):
        cnt *= c + 1
    ans += cnt
print(ans)


# Optimized solution
N = int(eval(input()))

print((sum((N - 1) // i for i in range(1, N))))
# Original solution
import math
n = int(eval(input()))

# floor_root_n = math.ceil(math.sqrt(n))
# # a<=bとしてかんがえる
# s = 0
# if not math.sqrt(n).is_integer():
#     for i in range(1, floor_root_n+1):
#         print(i)
#         s += 2*(floor_root_n-i+1)
# else:
#     for i in range(1, floor_root_n):
#         print(i)
#         s += 2*(floor_root_n-i)+1
# print(s)
s = 0
a = 1
b = 1
while a*b < n:
    while a*b < n:
        b += 1
        s += 1
    a += 1
    b = 1
print(s)


# Optimized solution
n = int(eval(input()))

s = 0
a = 1
b = 1
while a*b < n:
    while a*b < n and b <= a:
        if a == b:
            s += 1
        else:
            s += 2
        b += 1
    a += 1
    b = 1
print(s)
# Original solution
N = int(eval(input()))

count = 0
ABC = [0]*3

for a in range(1,N+1):
  for b in range(1,N+1):
    D = b*a
    if D >= N:
      break
    else:
#      print(a, b, N-D)
      count = count + 1
print(count)

# Optimized solution
N = int(eval(input()))

count = 0
count2 = 0
ABC = [0]*3

for a in range(1,N):
  if N % a == 0:
    x = int(N/a)-1
  else:
    x = int(N/a)
  count = count + x
#  print(x)

print(count)
# Original solution
N = int(eval(input()))

ans = 0

for a in range(1, N):
    cnt = 0
    for b in range(1, N):
        if a * b < N:
            if a < b:
                cnt += 2
            elif a == b:
                cnt += 1
        else:
            break
    
    ans += cnt

print (ans)

# Optimized solution
import math

N = int(eval(input()))

ans = 0

for a in range(1, N):
    cnt = 0
    for b in range(a, N):
        if a * b < N:
            if a < b:
                cnt += 2
            elif a == b:
                cnt += 1
        else:
            break
    ans += cnt

print (ans)
# Original solution
n = int(eval(input()))
ac = 0
for a in range(1,n):
    be = n // a
    for b in range(1,be+1):
        c = n - a * b
        if c > 0:
            ac += 1
print(ac)

# Optimized solution
n = int(eval(input()))
ac = 0
for a in range(1,n):
    be = (n-1) // a
    ac += be
print(ac)
# Original solution
N=int(eval(input()))

ans=0
for a in range(1,N):
  ans += (N-1)//a
  
print(ans)

# Optimized solution
def main():
  N=int(eval(input()))
  print((sum([(N-1)//a for a in range(1,N)])))
  
if __name__=="__main__":
  main()
# Original solution
N = int(eval(input()))

ans =0

for i in range(1,N+1):
    x = (N+1)/i
    R= round(x, 0)
    for n in range(1,int(R)+1):
        if  i*n < N:
            ans +=1
print(ans)

# Optimized solution
N = int(eval(input()))

ans =0

for i in range(1,N):
    ans += (N-1)//i
print(ans)
# Original solution
# -*- coding: utf-8 -*-
# モジュールのインポート
import math

# 標準入力を取得
N = int(eval(input()))

# 求解処理
ans = 0
for a in range(1, N):
    ans += math.ceil(N / a) - 1

# 結果出力
print(ans)


# Optimized solution
# -*- coding: utf-8 -*-
# モジュールのインポート
import math


def get_input() -> int:
    """
    標準入力を取得する.

    Returns:\n
        int: 標準入力
    """
    N = int(eval(input()))

    return N


def main(N: int) -> None:
    """
    メイン処理.

    Args:\n
        N (int): 正整数(2 <= N <= 10**6)
    """
    # 求解処理
    ans = 0
    for a in range(1, N):
        ans += math.floor((N - 1) / a)

    # 結果出力
    print(ans)


if __name__ == "__main__":
    # 標準入力を取得
    N = get_input()

    # メイン処理
    main(N)
# Original solution
N = int(eval(input()))
#それぞれの要素番号に対応する約数の表を作成
yakusuu_table = [0] * N
#今回調べるのは入力された値から-1
for i in range(1, N):
#iの倍数を調べる→iとばし
    for j in range(i,N,i):
        yakusuu_table[j] += 1
print((sum(yakusuu_table)))

# Optimized solution
N = int(eval(input()))
B_num = 0
for A in range(1, N):
    B_num += (N - 1) // A
print(B_num)
# Original solution
n = int(eval(input()))
cnt = 0
for a in range(1,n):
    i = 1
    while a * i < n:
        if a * (i+1000000) < n:
            cnt += 1000000
            i += 1000000
        else:
            cnt += 1
            i += 1
    
print(cnt)

# Optimized solution
n = int(eval(input()))
cnt = 0
for a in range(1,n):
    cnt += (n-1) // a
    
print(cnt)
# Original solution
n = int(eval(input()))
count = 0
for i in range(1,n):
	a = i
	b = 1
	while a*b < n:
		count+=1
		b+=1
print(count)

# Optimized solution
n = int(eval(input()))
count = 0
same = 0
for i in range(1,n):
	a = i
	b = i
	if a*b >= n:
		break
	same += 1
	while a*b < n:
		count+=1
		b+=1
print((count*2-same))
# Original solution
import collections

n = int(eval(input()))

if n == 1:
    print((0))
else:
    lis = [i for i in range(n+1)]
    for i in range(2, int(n**0.5) + 1):
        if lis[i] == i:
            lis[i] = i
            for j in range(i**2, n+1, i):
                if lis[j] == j:
                    lis[j] = i
#print(lis)
def bunkai(m):
    ans = []
    for i in range(m):
        ans.append(lis[m])
        m = m//lis[m]
        if m == 1:
            break
    return ans

ans = 1

for i in range(2,n):
    tmp = 1
    yaku = collections.Counter(bunkai(i))
    for i in yaku:
        tmp = tmp * (yaku[i] +1)
    ans += tmp

print(ans)




# Optimized solution
from collections import Counter

n = int(eval(input()))

if n == 1:
    print((0))
else:
    lis = [i for i in range(n+1)]
    for i in range(2, int(n**0.5) + 1):
        if lis[i] == i:
            lis[i] = i
            for j in range(i**2, n+1, i):
                if lis[j] == j:
                    lis[j] = i
#print(lis)
def bunkai(m):
    ans = []
    now = lis[m]
    cnt = 1
    for i in range(m):
        m = m//lis[m]
        if now == lis[m]:
            cnt += 1
        else:
            ans.append(cnt)
            cnt = 1
            now = lis[m]
        
        if m == 1:
            break
    return ans

ans = 1
for i in range(2,n):
    tmp = 1
    yaku = bunkai(i)
    for i in yaku:
        tmp *= (i +1)
    ans += tmp

print(ans)
# Original solution
n = int(eval(input()))
ans = 0
for i in range(1,n):
  for j in range(1,int(n/i)+2):
    if i*j < n:
      ans += 1
print(ans)

# Optimized solution
n = int(eval(input()))
ans = 0
for i in range(1,n):
  if n%i == 0:
    ans += int(n/i)-1
  else:
    ans += int(n/i)
print(ans)
# Original solution
import math
N = int(eval(input()))
cnt = 0
for a in range(1,N):
  for b in range(1,math.ceil(N/a)):
    c = N - a * b
    if c <= 0:
      break
    else:
      # print("a,b :",end='')
      # print(a,b)
      # print("c :" + str(c))
      cnt += 1
print(cnt)


# Optimized solution
import math
N = int(eval(input()))
cnt = 0
for a in range(1,N):
  for b in range(a,math.ceil(N/a)):
    c = N - a * b
    if c <= 0:
      break
    else:
      if a == b:
        cnt += 1
      else :
        cnt += 2
print(cnt)
# Original solution
N = int(eval(input()))

count = 0

for i in range(N-1):
  for j in range(N-1):
    if (i+1)*(j+1) < N:
      count += 1
    else:
      break
print(count)

# Optimized solution
N = int(eval(input()))

count = 0

for i in range(N-1):
  count = count + int((N-1)/(i+1))
  
print(count)
# Original solution
n=int(eval(input()))
o=0

for i in range(1,n):
    b=1
    while i*b<n:
        o+=1
        b+=1
print(o)

# Optimized solution
n=int(eval(input()))
o=0
nn=n-1
for i in range(1,n):
    o+=nn//i
print(o)
# Original solution
def main():
    N = int(eval(input()))
    count = 0
    for i in range(1, N):
        M = N // i + 1
        for j in range(1, M):
            k = N - i*j
            if k > 0 and N == i*j + k:
                count += 1

    print(count)


if __name__ == '__main__':
    main()


# Optimized solution

def main():
    N = int(eval(input()))
    count = 0
    for i in range(1, N):
        for j in range(1, N // i + 1):
            k = N - i*j
            if k > 0:
                count += 1
    print(count)

if __name__ == '__main__':
    main()
# Original solution
n = int(eval(input()))
ans = 0
for i in range(1,n):
    for j in range(1,n):
        if i*j <= n-1:
            ans += 1
        else:
            break
print(ans)


# Optimized solution
n = int(eval(input()))
ans = 0
for i in range(1,n):
    for j in range(i,n):
        if i*j <= n-1:
            if i == j:
                ans += 1
            else:
                ans += 2
        else:
            break
print(ans)
# Original solution
n= int(eval(input()))
ans=0
nn = int((n-1)//2)+1
for i in range(2,nn):
    for j in range(2,nn):
        if i*j>n-1:
            break
        else:
            ans += 1

ans += (n-1-1)*2
print((ans+1))

# Optimized solution
n= int(eval(input()))
ans=0
nn = int((n-1)//2)+1
for i in range(2,nn):
    for j in range(i,nn):
        if i*j>n-1:
            break
        else:
            if i==j:
                ans += 1
            else:
                ans+=2
# a or b =1
ans += (n-1-1)*2
print((ans+1))
# Original solution
n = int(eval(input()))
cnt = 0
for a in range(1, n):
    for b in range(1, ((n-1)//a)+1):
        c = n - a*b
        if c <= 0: break
        if a*b + c == n: cnt += 1
print(cnt)


# Optimized solution
n = int(eval(input()))
cnt = 0
for a in range(1, n):
    for b in range(1, ((n-1)//a)+1):
        c = n - a*b
        if c <= 0: break
        cnt += 1
print(cnt)
# Original solution
n = int(eval(input()))
cnt = 0
for a in range(1, n):
    for b in range(1, ((n-1)//a)+1):
        if n - a*b <= 0: break
        cnt += 1
print(cnt)


# Optimized solution
n = int(eval(input()))
c = 0
for a in range(1, n): c += (n-1)//a
print(c)
# Original solution
n = int(eval(input()))
c = 0
for a in range(1, n): c += (n-1)//a
print(c)


# Optimized solution
n = int(eval(input()))
print((sum([(n-1)//a for a in range(1, n)])))
# Original solution
n = int(eval(input()))
print((sum([(n-1)//a for a in range(1, n)])))


# Optimized solution
n = int(eval(input())) - 1 # n=n-1
print((sum([(n//x - x)*2 + 1 for x in range(1, int(n**0.5) + 1)])))
# Original solution
# -*- coding: utf-8 -*-
import math

N = int(eval(input()))

ans = 0
#N_half = int(math.sqrt(N)+1)
for A in range(1, N):
    for B in range(1, N):
        if A * B < N:
            ans += 1
        else:
            break
    
print(ans)

# Optimized solution
# -*- coding: utf-8 -*-
import math

N = int(eval(input()))

ans = 0
N_half = int(math.sqrt(N))
for A in range(1, N_half+1):
    for B in range(1, N):
        if A * B < N:
            ans += 1
            if B > N_half:
                ans += 1
        else:
            break
    
print(ans)
# Original solution
n = int(eval(input())) - 1

j = 0

ans = 0

for i in range(1, n):
    
    j = i
    
    while True:
        j += 1
        if i * j > n:
            break
        ans += 1


k = 1

er = 0

while True:
    er += 1
    if k ** 2 > n:
        break
    k += 1


print(((ans * 2) + er - 1))


# Optimized solution
n = int(eval(input())) - 1

j = 0

ans = 0

for i in range(1, n):
    
    j = i
    
    while True:
        j += 1
        if i * j > n:
            break
        ans += 1

k = 1

er = 0

while True:
    if k ** 2 > n:
        break
    er += 1
    k += 1

print(((ans * 2) + er))
# Original solution
num = int(eval(input()))
ans = 0
for x in range(num):
    for y in range(x,num):
        val = (x+1) * (y+1)
        if val < num and x == y: ans += 1
        elif val < num and x != y: ans += 2
        else: break
print(ans)

# Optimized solution
num = int(eval(input()))
ans = 0
for x in range(num):
    if num % (x + 1) == 0: ans += num // (x + 1) - 1
    else: ans += num // (x + 1)
print(ans)
# Original solution
N = int(eval(input()))
ans = 0
for i in range(1, N+1):
    cnt = N // i + 1
    for j in range(1, cnt+1):
        if i * j >= N:
            break
#         print(1, j)
        ans += 1
print(ans)



# Optimized solution
N = int(eval(input()))
ans = 0
for i in range(1, N+1):
    cnt = (N-1) // i
#     for j in range(1, cnt+1):
#         if i * j >= N:
#             break
#         print(1, j)
    ans += cnt
print(ans)
# Original solution
n = int(eval(input()))

ans = 0
for A in range(1, n):
  for B in range(1, n):
    if A * B >= n:
      break
    ans += 1

print(ans)

# Optimized solution
import math

n = int(eval(input()))

ans = 0

for A in range(1, n):
  if n % A == 0:
    ans += n // A - 1
  else:
    ans += n // A

print(ans)
# Original solution
n = int(eval(input()))
ans = 0
for a in range (1,n):
    for b in range(1, n):
        temp = a * b
        if n <= temp:
            break
        ans += 1
print(ans)

# Optimized solution
n = int(eval(input()))
ans = 0
for a in range (1,n):
    for b in range(1, n):
        if n <= a * b:
            break
        ans += 1
print(ans)
# Original solution
n = int(eval(input()))
ans = 0
for a in range (1,n):
    temp = 0
    for b in range(1, n):
        temp = a * b
        if n <= temp:
            break
        ans += 1
print(ans)

# Optimized solution
n = int(eval(input()))
ans = 0
for a in range (1,n):
    for b in range(a, n, a):
        ans += 1
print(ans)
# Original solution
N=int(eval(input()))
s=0
for i in range(1,N):
  s+=(N-0.1)//i

print((int(s)))

# Optimized solution
N=int(eval(input()))
s=0
for i in range(1,N):
  s+=(N-1)//i
print(s)
# Original solution
import math

N = int(eval(input()))
cnt = 0
for i in range(1, int(math.sqrt(N)) + 1):
    for j in range(1, N // i + 1):
        if i * j < N:
            if i == j:
                cnt += 1
            elif i < j:
                cnt += 2
print(cnt)


# Optimized solution
n = int(eval(input()))
print((sum([(n - 1) // i for i in range(1, n)])))
# Original solution
n = int(eval(input()))
a, b, c = 1, 1, 1
ans = 0

while n >= c:
    while b <= (n-c):
        ans += (n-c)//b
        b += 1
    c += 1

print(ans)


# Optimized solution
def solve1():
    n = int(eval(input()))
    a, b, c = 1, 1, 1
    ans = 0

    while n >= c:
        while b <= (n-c):
            ans += (n-c)//b
            b += 1
        c += 1

    print(ans)


def solve2():
    n = int(eval(input()))
    ans = 0

    for i in range(1, n):
        ans += (n-1)//i

    print(ans)


solve2()
# Original solution
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()

# Optimized solution
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()
# Original solution
n = int(eval(input()))
ans = 0
for a in range(1, n+1):
    b=1
    while n-a*b>0:
        ans += 1
        b+=1
print(ans)


# Optimized solution
n = int(eval(input()))
ans = 0
for a in range(1, n+1):
    b=1
    while n>a*b:
        ans += 1
        b+=1
print(ans)
# Original solution
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()


# Optimized solution
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()
# Original solution
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)


# Optimized solution
N = int(eval(input()))
ans = 0
for i in range(1, N):
    ans += (N-1) // i

print(ans)
# Original solution
N=int(eval(input()))
ans=0
for i in range(1,N):
    if N%i!=0:
        for j in range(1,N//i+1):
            a=i*j+N-i*j
            if a==N:
                ans+=1
    else:
        for j in range(1,N//i):
            a=i*j+N-i*j
            if a==N:
                ans+=1
print(ans)

# Optimized solution
N=int(eval(input()))
ans=0
for i in range(1,N):
    if N%i!=0:
        for j in range(1,N//i+1):
            ans+=1
    else:
        for j in range(1,N//i):
            ans+=1
print(ans)
# Original solution
n = int(eval(input()))
count = 0
for a in range(1,n):
    for b in range(1,n):
        if a*b<n:
            count+=1
        else:
            break
print(count)

# Optimized solution
n = int(eval(input()))
count = 0
for a in range(1,n):
    if n%a==0:
        b = n//a - 1
    else:
        b = n//a
    count+=b
print(count)
# Original solution
n = int(eval(input()))

ans = 0
for a in range(1, n):
    for b in range(1, n):
        if a * b < n:
            ans += 1
        else:
            break
print(ans)


# Optimized solution
n = int(eval(input()))
print((sum((n - 1) // a for a in range(1, n))))