Problem:
 Score : 300 points    Problem Statement 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 1 3      Sample Output 1 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) .       Sample Input 2 100      Sample Output 2 473       Sample Input 3 1000000      Sample Output 3 13969985

Solution (Python):
def main():
    examC()

def examA():
    S = SI()
    if S[-1]=="s":
        ans = S+"es"
    else:
        ans = S+"s"
    print(ans)
    return

def examB():
    N = I()
    D = [LI()for _ in range(N)]
    current = 0
    for d1,d2 in D:
        if d1==d2:
            current += 1
        else:
            current = 0
        if current==3:
            print("Yes")
            return
    print("No")
    return

def examC():
    N = I()
    cnt = 0
    for i in range(1,N):
        for j in range(1,1+N//i-(N%i==0)):
            cnt += 1
    ans = cnt
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

from decimal import getcontext,Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,alphabet_convert,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 1<<31
_ep = dec("0.000000000001")
alphabet = [chr(ord('a') + i) for i in range(26)]
alphabet_convert = {chr(ord('a') + i): i for i in range(26)}

getcontext().prec = 28

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    main()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N = int(input())

    ans = 0

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

    print(ans)


if __name__ == '__main__':
    main()

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

Solution (Python):
N = int(input())
res = 0
for i in range(1,N+1):
    if N%i ==0 and N//i>=2:
        res += N//i-1
    elif N%i!=0:
        res += N//i
print(res)

Solution (Python):
n = int(input())

cnt = 0
for i in range(1, n+1):
  for j in range(1, n+1):
    if i * j >= n:
      break
    
    cnt += 1

print(cnt)

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


if __name__ == '__main__':
    resolve()

Solution (Python):

import os
import sys
from io import BytesIO, IOBase

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")


from math import gcd, ceil

def pre(s):
    n = len(s)
    pi = [0] * n
    for i in range(1, n):
        j = pi[i - 1]
        while j and s[i] != s[j]:
            j = pi[j - 1]
        if s[i] == s[j]:
            j += 1
        pi[i] = j
    return pi


def prod(a):
    ans = 1
    for each in a:
        ans = (ans * each)
    return ans

def lcm(a, b): return a * b // gcd(a, b)


def binary(x, length=16):
    y = bin(x)[2:]
    return y if len(y) >= length else "0" * (length - len(y)) + y


for _ in range(int(input()) if not True else 1):
    n = int(input())
    
    
    
    
    
    ans = 0
    for i in range(1, n):
        a = i
        b = n // a - (n % a == 0)
        ans += max((b), 0)
    print(ans)

Solution (Python):
N = int(input())

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

print(result)

Solution (Python):
N=int(input())

ans=0
for A in range(1,N+1):
    B=1
    while(A*B<N):
        ans+=1
        B+=1
print(ans)

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

Solution (Python):


import sys
readline = sys.stdin.readline
read = sys.stdin.read




n = int(input())

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



print(ans)

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy,deepcopy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

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

Solution (Python):
N = int(input())
tau = [0 for i in range(N)]
for d in range(1,N):
    for n in range(d,N,d):
        tau[d] += 1

print(sum(tau))

Solution (Python):
N = int(input())
ans = 0
for i in range(1, 10 ** 6):
    if N // i > 0:
        ans += N // i
    if N % i == 0:
        ans -= 1
print(ans)

Solution (Python):
N = int(input())
ans = 0
for a in range(1, N + 1):
    for b in range(1, N + 1):
        if a * b >= N: break
        ans += 1
print(ans)

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

print(ans)

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

Solution (Python):

import sys


sysread = sys.stdin.buffer.readline
read = sys.stdin.buffer.read
printout = sys.stdout.write
sprint = sys.stdout.flush


sys.setrecursionlimit(10 ** 7)









INF = 1 << 50
EPS = 1e-8
mod = 10 ** 9 + 7


def intread():
    return int(sysread())
def mapline(t=int):
    return map(t, sysread().split())
def mapread(t=int):
    return map(t, read().split())

def run():
    N = int(sysread())
    ans = 0
    for a in range(1, N):
        for b in range(1, N//a+1):
            c = N - a * b
            if c > 0:
                ans += 1
    print(ans)
if __name__ == "__main__":
    run()

Solution (Python):
import sys
import math


def input():
    return sys.stdin.readline().rstrip()


def main():
    N=int(input())

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

    print(ans)








if __name__ == "__main__":
    main()

Solution (Python):
ans = 0
n = int(input())
for i in range(1,n+1):
  for j in range(1,n//i+1):
    if i * j < n:ans += 1
print(ans)

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

Solution (Python):
import sys
sys.setrecursionlimit(10**7) 
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque, defaultdict


from collections import Counter

from itertools import accumulate,combinations,permutations,product

from heapq import heapify,heappop,heappush

from functools import reduce,lru_cache

from decimal import Decimal
from argparse import ArgumentParser

args=ArgumentParser()
args.add_argument('-loc', '--local', type=bool,default=False)
LOCAL=args.parse_args().local

def input(): 
    x=sys.stdin.readline(); 
    if x[-1]=="\n": 
        return x.rstrip() 
    return x
    
def printe(*x):_=print("
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def binr(x): return bin(x)[2:]
def bitcount(x): 
    x= x - ((x >> 1) & 0x5555555555555555)
    x= (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x= (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f 
    x+= (x >> 8); x+= (x >> 16); x+= (x >> 32) 
    return x & 0x7f
def yakusuu(n):
    divisors = set()
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.add(i)
            if i != n // i:
                divisors.add(n//i)
    
    return divisors

def main():
    mod = 1000000007
    

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


if __name__ == "__main__":
    main()

Solution (Python):

n = int(input())

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

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    n = int(input())

    count = [0]*(n)

    for i in range(1, n):
        for j in range(i, n, i):
            count[j] += 1
    
    ans = sum(count)
    print(ans)
    
    
    
    
if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
ret = 0
for b in range(1,n):
    ret += (n-1)//b
print(ret)

Solution (Python):
N=int(input())
D=[0 for i in range(N+1)]
for i in range(1,N+1):
    for j in range(i,N+1,i):
        D[j]+=1
ans=0
for AB in range(1,N):
    ans+=D[AB]
print(ans)

Solution (Python):
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)

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

Solution (Python):
ans=0
n=int(input())
for i in range(1,n):
	for j in range(1,n):
		if i*j<n:
			ans+=1
		else:
			break
print(ans)

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

Solution (Python):

N = int(input())
ans = 0

for a in range(1,N):

    maxb = N // a

    if maxb * a == N:
        ans += maxb-1
    else:
        ans += maxb

print (ans)

Solution (Python):
N = int(input())

a = 1
answer = 0

while a<N:
  answer += (N-1)//a
  a += 1

print(answer)

Solution (Python):
N = int(input())
cnt = [0] * (N + 1)
for A in range(1, N+1):
    B = 1
    while A * B <= N:
        cnt[A * B] += 1
        B += 1
ans = 0
for C in range(1, N):
    ans += cnt[N - C]
print(ans)

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

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

Solution (Python):
N = int(input())
ans = 0

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

Solution (Python):
N = int(input())



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

Solution (Python):
import sys
input = sys.stdin.readline
from collections import *

N = int(input())
ans = 0

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

print(ans)

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

Solution (Python):
import sys
input = sys.stdin.readline

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

print(ANS)

Solution (Python):
n = int(input())

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

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
res = 0
for i in range(1, N + 1): res += (N - 1) // i
print(res)

Solution (Python):
n = int(input())

ans = 0
for a in range(1, n):
    temp = n // a
    if temp * a == n:
        temp -= 1

    ans += temp
print(ans)

Solution (Python):


import os,sys
from io import BytesIO, IOBase

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

BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == '__main__':
    main()

Solution (Python):
import sys
import re
import random
import math
import copy
from heapq import heappush, heappop, heapify
from functools import cmp_to_key
from bisect import bisect_left, bisect_right
from collections import defaultdict, deque, Counter



input = sys.stdin.readline
getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = float("inf")
MOD = 10**9 + 7
divide = lambda x: pow(x, MOD-2, MOD)


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

    print(ans)
def main():
    n = getN()
    for _ in range(n):
        solve()

    return
if __name__ == "__main__":
    
    solve()

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

Solution (Python):
n = int(input())
ans = 0 
for a in range(1,n+1):
  for b in range(1,n//a+1):
    if a*b < n:
      ans += 1
print(ans)

Solution (Python):
N=int(input())

K=0
for a in range(1,N+1):
    b=1
    while a*b<N:
        K+=1
        b+=1
print(K)

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

Solution (Python):
n = int(input())
ans = 0
for a in range(1, n + 1):
    b = 1
    while a * b < n:
        ans += 1
        b += 1
print(ans)

Solution (Python):


import sys
input=sys.stdin.readline

n=int(input())
ans=0
for a in range(1,n+1):
    for b in range(1,n+1):
        if a*b>=n:
            break
        ans+=1
print(ans)

Solution (Python):
import sys

sys.setrecursionlimit(500005)
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

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

Solution (Python):
N=int(input())
s=0
for A in range(1,1+N):
  s+=N//A
  if N%A==0:
    s-=1
print(s)

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

Solution (Python):
N = int(input())

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

Solution (Python):

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

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

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

Solution (Python):
import sys

input = sys.stdin.readline

n = int(input())

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

Solution (Python):
N = int(input())
ans = 0
for i in range(1,N+1):
  for j in range(1,N+1):
    if i*j>=N:
      break
    ans += 1
print(ans)

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

Solution (Python):
mod = 1000000007
eps = 10**-9


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

    N = int(input())
    ans = 0
    for a in range(1, N+1):
        for b in range(1, N+1):
            if a * b >= N:
                break
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()