Given is a positive integer N.
How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

-----Constraints-----
 -  2 \leq N \leq 10^6
 - All values in input are integers.

-----Input-----
Input is given from Standard Input in the following format:
N

-----Output-----
Print the answer.

-----Sample Input-----
3

-----Sample Output-----
3

There are 3 tuples of integers that satisfy A \times B + C = 3: (A, B, C) = (1, 1, 2), (1, 2, 1), (2, 1, 1).

Difficulty: introductory

Starter code:

Solutions:
N = int(input())
ANS = 1
for i in range(1,N-1):
  ANS += (N-1)//i
  
print(ANS)

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

print(ans)



import math

# ------------->>>>>>>>>>>>|<<<<<<<<<<<<<<<--------------
N = int(input())
cnt = 0
for i in range(1, N + 1):
    cnt += ((N-1 )// i)


    


print(cnt)


N = int(input())

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

def main():
    n = int(input())
    m = int(n**0.5)+1
    ans = 0
    for a in range(1, m):
        for b in range(a, n):
            if a*b < n:
                if a != b:
                    ans += 2
                else:
                    ans += 1
            else:
                break
    print(ans)


main()


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

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

N = int(input())

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

print(cnt)


N = int(input())
cnt = 0
for i in range(1, N):
  add =  (N-1)//i
#  print(add)
  cnt += add
  if add < 1:
    break
    
print(cnt)

N = int(input())
ans = 0
for i in range(1, N):
    if N % i != 0:
        ans += N // i
    else:
        ans += N // i - 1
print(ans)

from sys import stdin
N = int(stdin.readline().rstrip())
ans = 0
for i in range(1, N):
    ans += (N-1) // i
print(ans)

n = int(input())
ans = 0
for i in range(1,n):
  ans += ((n-1)//i)
print(ans)

n=int(input())
sum=0
for a in range(1,n):
  sum=sum+(n-1)//a
print(sum)

n = int(input())
ans = 0
for i in range(n-1):
    ans += (n-1)//(i+1)
    
print(ans)

N=int(input())
count=0
for A in range(1,N):
  count+=(N-1)//A
print(count)
  


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



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


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

# -*- coding: utf-8 -*-


def run_prime_factorization(max_number: int) -> dict:
    '''Run prime factorization.
    Args:
        max_number: Int of number (greater than 1).
    Returns:
        A dictionary's items ((base, exponent) pairs).
    Landau notation: O(log n)
    '''

    from math import sqrt

    ans = dict()
    remain = max_number

    for base in range(2, int(sqrt(max_number)) + 1):
        if remain % base == 0:
            exponent_count = 0

            while remain % base == 0:
                exponent_count += 1
                remain //= base

            ans[base] = exponent_count

    if remain != 1:
        ans[remain] = 1

    return ans


def main():
    from math import floor
    import sys
    input = sys.stdin.readline

    n = int(input())
    ans = 0

    for a in range(1, n):
        b = floor(n / a)
        ans += b

    p = list(run_prime_factorization(n).values())

    if len(p) == 1:
        ans -= list(p)[0]
    else:
        count = 1

        for pi in p:
            count *= (pi + 1)

        ans -= count
        ans += 1

    print(ans)


def __starting_point():
    main()

__starting_point()

n=int(input())
cn=0
for i in range(1,n):
    cn+=(n-1)//i
print(cn)

N = int(input())
ans = 0

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

print(ans)


n = int(input())
ans = 0
for i in range(1, n):
    ans += (n-1)//i
print(ans)

# -*- coding: utf-8 -*-


def main():
    import sys
    input = sys.stdin.readline

    n = int(input())
    ans = 0

    # KeyInsight:
    # 変数を一つ固定
    # 式を性質を保持しながら、単純化する
    for a in range(1, n):
        # a * b <= n - 1
        ans += (n - 1) // a

    print(ans)


def __starting_point():
    main()

__starting_point()

def main():
    n = int(input())
    ans, i = 0, 1
    while i < n:
        ans += (n-1) // i
        i += 1
    print(ans)


main()

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

import math

n = int(input())

ans = 0

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

print(ans)


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

def main():
    n = int(input())
    ans = 0
    for a in range(1, 10 ** 6 + 1):
        b = 1
        while a * b < n:
            ans += 1
            b += 1
    print(ans)


def __starting_point():
    main()

__starting_point()

n = int(input())
count = 0
for a in range(1,n):
    count += (n-1) // a
print(count)

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

n = int(input())
sumn = 0
for a in range(1,n+1):
  if n % a == 0:
    sumn += n // a - 1
  else:
    sumn += n // a
print(sumn)

n = int(input())
ans = 0

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

print(ans)

#ｃは考えなくて良い　A*B = N - c より　A*B < Nと考えればOK
# N%a == 0 のとき
N = int(input())
ans = 0
for a in range(1, N):
    if N % a == 0:
        ans += (N // a - 1)
    else:
        ans += (N // a)
print(ans)

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

N = int(input())
        
count = 0
for A in range(1,N):
    count += (N-1)//A
print(count)  

def kai():
    n = int(input())
    ans = 0
    for a in range(1,n):
        for b in range(1,n):
            c = n - a*b
            if c > 0:
                ans += 1
                
            else:
                break
    return ans
print(kai())

# -*- coding: utf-8 -*-


# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return list(map(int, input().split()))


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))

cache = {}
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp // i in cache:
            arr = cache[temp // i]
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    cache[n] = arr
    return arr

def main():
    N = input_int()

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

    print(cnt)


def __starting_point():
    main()

__starting_point()

N=int(input())
count=0
for i in range(1,N):
    h=(N-1) // i 
    count+=h
print(count)

N = int(input())
count=0

for A in range(1,N-1):
    B =  (N-1)//A
    count += B

print(count+1)     

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

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

n = int(input())
x = 0
for i in range(1,n):
  x += (n-1) // i
print(x)


n = int(input())

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


n = int(input())
count = 0
for a in range(1,n):
  count += (n-1) // a

print(count)


import math

N = int(input())

res = 0
for a in range(1, N):
  res += math.floor((N-1) / a)

print(res)

n = int(input())
ans = 0
for i in range(1,n):
    ans += (n-1)//i
print(ans)

import math

N = int(input())

S = 0

for A in range(1, N):
  S += max(0, int(math.ceil(N/A) - 1))

print(S)

import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: list(map(int, sys.stdin.readline().split()))
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7


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



import sys

input = sys.stdin.readline


def main():
    n = int(input())
    cnt = 0
    for a in range(1, n):
        for b in range(1, n):
            if a * b < n:
                cnt += 1
            else:
                break
    print(cnt)


def __starting_point():
    main()

__starting_point()

n = int(input())


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

print(k)

n = int(input())
ans = 0;
for a in range(1,n):
  ans += (n-1)//a
print(ans)

n=int(input())
cnt=0
for a in range(1,n+1):
    cnt += (n-1)//a
print(cnt)

#abc179c
n=int(input())
res=0
for i in range(1,n):
 res+=(n-1)//i
print(res)


n = int(input())
count = 0

for a in range(1, n + 1):
  for b in range(a, n + 1):
    if a * b >= n:
      break
    count += 2 if a != b else 1
     
print(count)

#C
#A*B+C=N A*B=N-C
n = int(input())
ans=0
for i in range(1, n):
    ans += (n - 1) // i
print(ans)

N = int(input())

ans = 0

for i in range(1,N):
    ans += int((N-1)/i)
print(ans)

N=int(input())
count=0
for A in range(1,10**6+1):
  if A > N:
    break
  else:
    count+=(N-1)//A
print(count)

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

print(ans)

n = int(input())
ans= 0
for i in range(1, n):
    ans += (n - 1) // i
print(ans)

import math
n=int(input())
k=0
l=int(math.sqrt(n-1))
for i in range(1,l+1):
    k+=(n-1)//i-i
print(k*2+l)

def solve():
    ans = 0

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

    return ans


n = int(input())

print((solve()))


N = int(input())
count = 0

for a in range(1, N):
    count +=int((N-1)/a)

print(count)

# -*- coding: utf-8 -*-

n = int(input())

count = 0
max_divisor_n = n // 2
for a in range(1, n):
    # ループは a >= b で回し、a != b の時は入れ替えたケースもカウントする
    for b in range(1, a+1):
        if a*b >= n:
            break
        # c = n - a*b とすればよい
        count += 1
        if a != b:
            count += 1
print(count)

#時間制限がかかるn > a*bの時を考える1< a < n-1
n = int(input())
ans = 0
for i in range(1,n):
    if n % i == 0:
        ans += n // i - 1
    else:
        ans += n // i
    
print(ans)



import numpy as np

N = int(input())

LS = np.array([sum([1 for i in range((N - 1)//(j + 1))]) for j in range(N)])

print((sum(LS)))


import math

N = int(input())

count = 0
for i in range(1, N):
    count += math.ceil(N / i) - 1

print(count)


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



N = int(input())
count = 0
for i in range(1,N):
    count += (N-1)//i
print(count)

n = int(input())
ans = 0
for i in range(n-1):
    ans += (n-1)//(i+1)

print(ans)

N=int(input())
count=0
for A in range(1,N):
    count+=(N-1)//A


print(count)

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


n = int(input())
count = 0

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


n = int(input())

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

print(ans)


N=int(input())
ans=0

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

n = int(input())
t = int(n**(1/2))
a = 0
for i in range(1,t+1):
  if i**2 == n:
    a += i-1
  else:
    if int((n-1)/i) > t:
      a += int((n-1)/i)*2 - t
    else:
      a += int((n-1)/i)
print(a)

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

print(ans)

n = int(input())
# def make_divisors(n):
#     lower_divisors , upper_divisors = [], []
#     i = 1
#     while i*i <= n:
#         if n % i == 0:
#             lower_divisors.append(i)
#             if i != n // i:
#                 upper_divisors.append(n//i)
#         i += 1
#     return lower_divisors + upper_divisors[::-1]
# cnt=0
# for c in range(1,n):
#     ab = n-c
#     ls = make_divisors(ab)
#     cnt+=len(ls)
# print(cnt, flush=True)

# C will be decided automatically
cnt=0
for a in range(1,n):
    b = (n-1)//a
    cnt += b
print(cnt, flush=True)



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

# coding:utf-8

n = int(input())
count = 0

for a in range(1, n):
    count += (n-1)//a


print(count)


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

n = int(input())
ans = 0
for i in range(n-1):
    ans += (n-1)//(i+1)
    
print(ans)


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


import math
n=int(input())
summ=0
for i in range(1,n):
    summ+=(n-1)//i
print(summ)    

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

n = int(input())
out = 0
for i in range(1, n):
  out += n // i
  if n % i == 0:
    out -= 1
print(out)

n = int(input())
ans = 0
for i in range(1,n):
    ans += (n - 1) // i
print(ans)

import math


def main():
    n = int(input())
    cnt = 0
    for a in range(1, n):
        for b in range(1, n):
            if n - a * b > 0:
                cnt += 1
            else:
                break
    print(cnt)


def __starting_point():
    main()

__starting_point()

n = int(input())

ans = 0

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

print(ans)

N = int(input())
cnt = 0
for i in range(1,N):
  cnt += (N-1)//i
print(cnt)

n = int(input())

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


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


def parse():
  N = int(input())
  return N

def main():
  N = parse()

  limit_n = 10 ** 6

  ans = 0
  for A in range(1, min(limit_n, N)):
    for B in range(1, min(limit_n, N)):
      if A * B >= N: break

      # C = N - A * B
      # if C == 0: continue

      # if A * B + C == N:
        # print(A, B, C)
      ans += 1

  print(ans)

def __starting_point():
  main()

__starting_point()

n=int(input())
r=0
for i in range(1,n):
    r+=(n-1)//i
print(r)

n = int(input())
ans = 0
for i in range(1, 10**6):
    ans += (n-1) // i

print(ans)


N=int(input());print(sum(~-N//i for i in range(1,-~N)))

# def cin():
#     return list(map(int, input().split()))

# count = 0
# N = cin()[0]

# for i in range(1, N+1):
#     num = N - i
#     for j in range(1, N+1):
#         if num != 0 and num % j == 0:
#             count += 1
    
# print(count)
import math


def cin():
    return list(map(int, input().split()))

count = 0
N = cin()[0]

for A in range(1, N+1):
    B = math.floor(N / A)
    C = N % A
    
    if B != 0 and C != 0:
        count += B
    elif B != 0 and C == 0:
        count += B - 1
    
print(count)

n = int(input())
ans = 0
for i in range(1, n):
    ans += (n - 1) // i
print(ans)


n = int(input())

count = 0

for i in range(1, n):
    res = (n - 1) // i
#    print(res)
    count += res

print(count)


n=int(input())
u=0
for i in range(1,n):
    u=u+(n-1)//i

print(u)