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):
import sys



from copy import *
from bisect import *	

from math import gcd,ceil,sqrt
from itertools import permutations as prm,product
 
def eprint(*args):
    print(*args, file=sys.stderr)
zz=1
 

if zz:
	input=sys.stdin.readline
else:	
	sys.stdin=open('input.txt', 'r')
	sys.stdout=open('all.txt','w')
di=[[-1,0],[1,0],[0,1],[0,-1]]
def inc(d,c,x=1):
	d[c]=d[c]+x if c in d else x
def bo(i):
	return ord(i)-ord('A')	
def li():
	return [int(xx) for xx in input().split()]
def fli():
	return [float(x) for x in input().split()]	
def comp(a,b):
	if(a>b):
		return 2
	return 2 if a==b else 0		
def gi():	
	return [xx for xx in input().split()]
def fi():
	return int(input())
def pro(a): 
	return reduce(lambda a,b:a*b,a)		
def swap(a,i,j): 
	a[i],a[j]=a[j],a[i]	
def si():
	return list(input().rstrip())	
def mi():
	return 	map(int,input().split())			
def gh():
	sys.stdout.flush()
def isvalid(i,j):
	return 0<=i<n and 0<=j<m and a[i][j]!="."
def bo(i):
	return ord(i)-ord('a')	
def graph(n,m):
	for i in range(m):
		x,y=mi()
		a[x].append(y)
		a[y].append(x)

t=1

def sieve(MAXN): 

    spf[1] = 1
    for i in range(2, MAXN): 

        spf[i] = i 

    for i in range(4, MAXN, 2): 
        spf[i] = 2
  
    for i in range(3, ceil(sqrt(MAXN))): 

        if (spf[i] == i): 

            for j in range(i * i, MAXN, i):  

                if (spf[j] == j): 
                    spf[j] = i 
  

def fact(x): 
    ret = {}
    while (x != 1): 
        if spf[x] not in ret:
        	ret[spf[x]]=1
        else:
        	ret[spf[x]]+=1	
        x = x // spf[x] 
  
    return ret		


while t>0:
	t-=1
	n=fi()
	spf=[0]*(n+1)
	sieve(n+1)
	ans=0
	for i in range(1,n):
		r=fact(n-i)
		o=0
		p=1
		for ii in r:
			p*=(r[ii]+1)
	
		ans+=p

	print(ans)

Solution (Python):
n = int(input()) - 1
lst = [n // k for k in range(1, int(n**0.5+1))]
print(2 * sum(lst) - int(n**0.5)**2)

Solution (Python):
n = int(input())
dp = [0] * (n + 1)
for x in range(1, n + 1):
    for y in range(x, n + 1, x):
        dp[y] += 1
print(sum(dp[1:n]))

Solution (Python):
n=int(input())-1
print(sum(n//-~i for i in range(n)))

Solution (Python):

n = int(input())
ans = 0 

is_primes = [True for _ in range(n+1)]
is_primes[0] = is_primes[1] = False
minFactor = [-1 for _ in range(n+1)]

for i in range(2, n+1):
    if not is_primes[i]: continue
    minFactor[i] = i 
    for j in range(i*i, n+1, i): 
        is_primes[j] = False
        minFactor[j] = i 


def fast_factorization(n):
    data = {}
    while n > 1:
        if minFactor[n] not in data:
            data[minFactor[n]] = 1 
        else:
            data[minFactor[n]] += 1
        n //= minFactor[n]
    return data


def count_divisors(n):
    ret = 1 
    for v in fast_factorization(n).values():
        ret *= (v+1)
    return ret 

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

print(ans)

Solution (Python):

n = int(input())
ans = 0 

is_primes = [True for _ in range(n+1)]
is_primes[0] = is_primes[1] = False
minFactor = [-1 for _ in range(n+1)]

for i in range(2, n+1):
    if not is_primes[i]: continue
    minFactor[i] = i 
    for j in range(i*i, n+1, i): 
        is_primes[j] = False
        minFactor[j] = i 


def fast_factorization(n):
    data = {}
    while n > 1:
        if minFactor[n] not in data:
            data[minFactor[n]] = 1 
        else:
            data[minFactor[n]] += 1
        n //= minFactor[n]
    return data


def count_divisors(n):
    ret = 1 
    for v in fast_factorization(n).values():
        ret *= (v+1)
    return ret 

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

print(ans)

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

Solution (Python):
num = int(input())
tot = 0
i = 1
while i < num:
    if num % i == 0:
        i2 = num / i - 1
    else:
        i2 = int(num / i)
    tot += i2
    i += 1
print(int(tot))

Solution (Python):
import math
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        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])
    return arr
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())
mod = 10**9 + 7



n = ini()
ans = 0

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

print(int(ans))

Solution (Python):
import time
startTimeProblem=time.time()

import fileinput, sys, itertools, functools

from bisect import *
from heapq import *
from collections import *

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

class InputHelper:
    def __init__(self):
        self.myinput = fileinput.input()

    def isLocal(self):
        return not fileinput.isstdin()

    def int(self):
        return int(self.myinput.readline().rstrip())

    def ints(self):
        return [int(_) for _ in self.myinput.readline().rstrip().split()]

    def str(self):
        return self.myinput.readline().rstrip()

    def strs(self):
        return [_ for _ in self.myinput.readline().rstrip().split()]

class OutputHelper:
    def int(self, a):
        print(a)    

    def ints(self, a):  
        print(" ".join([str(_) for _ in a]))
    
    def intsNL(self, a):
        for _ in a:
            print(_)
    
    def str(self, s):
        print(s)

    def strs(self, s):
        print(" ".join([_ for _ in s]))

    def strsNL(self, s):
        for st in s:
            print(st)

class ListNode:
    def __init__(self, val):
        self.val = val
        self.next = None
        self.prev = None

In = InputHelper()
Out = OutputHelper()



N = In.int()

A = 1
summed = 0
N-=1
while N//A>0:
    amt = N//A
    summed+=amt
    A+=1

Out.int(summed)



if len(sys.argv)>2 and sys.argv[2]=="TIMEIT":
    fin = (time.time()-startTimeProblem)*1000
    print("{:.2f}".format(fin) + "ms")

Solution (Python):
import sys
import os
import math
import bisect
import itertools
import collections
import heapq
import queue
import array







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()

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 i in range(1,N):
    ans += (N - 1) // i
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())

print(sum((N-1)//a for a in range(1,N+1)))

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

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    ans=0
    
    N=I()
    for a in range(1,N):
        for b in range(1,N):
            if a*b>=N:
                break
            ans+=1
            
    print(ans)

        
        
    

main()

Solution (Python):
n=int(input())
print(sum(~-n//i for i in range(1,n)))

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

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

print(cnt)

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

cnt = 0
for a in range(1,n+1):
    if n%a != 0:
        cnt +=n//a
    else:
        cnt +=n//a-1
    
print(cnt)

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

for i in range(1, n):
  x = n//i
  y = x-1 if n==x*i else x
  ans += y
  
print(ans)

Solution (Python):
import math
def II(): return int(input())
N=II()
ans=0
Ceiling=math.floor((N-1)**0.5)

for i in range(1,Ceiling+1):  
    Sq=i*i
    A=N-Sq
    if A>i:
      ans+=int(2*math.ceil(A/i)-1)
      
    else:
      ans+=1
      
print(ans)

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

Solution (Python):
import math
t = 1
for tc in range(t):
    n = int(input())
    ans = 0
    for i in range(1,n+1):
        j = 1
        ans += (n-1) // i
        
        
        
    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())
ans = 0
for i in range(1, n+1):
    ans += (n - 1) // i
print(ans)

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

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

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

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())
ans = 0
d = [1]*(1000010)
for k in range(2,1000010):
    t = 1
    while k*t <= 1000001:
        d[k*t] += 1
        t += 1
for M in range(1,N):
    ans += d[M]
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())

"""
a x b = n-c
となる組合せを探す。
c>=1なので、a x b <= n-1ならばcを適当に決めて
組合せにできる
"""
n-=1
ans = 0
a = 1
while a <= n:
    ans += n//a
    a+=1
print(ans)

Solution (Python):
def main():
  N=int(input())
  print(sum([(N-1)//a for a in range(1,N)]))
  
if __name__=="__main__":
  main()

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

print(ans)

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

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

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

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")


def solve():
    n = II()
    ans = 0
    for a in range(1, n):
        b = n // a
        if n % a == 0:
            b -= 1
        ans += b
    print(ans)
    return



if __name__ == '__main__':
    solve()

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

Solution (Python):
import math
import collections
import fractions
import itertools
import functools
import operator
import bisect

N = int(input())

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

if __name__ == "__main__":
    solve()

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 i in range(1,n):
    ans += (n-1)//i
print(ans)

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

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

print(cnt)

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

print(count)

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

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

print(ans)

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

N = int(input())

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

print(ans)

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

Solution (Python):
import math

case_num = 0

N = int(input())

for num in range(N - 1):
  num += 1
  
  case_num += ( math.ceil(N / num) - 1 )


print(case_num)

Solution (Python):
import math
n = int(input())
ans = 0

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

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 i in range(1,N):
    ans += (N-1)//i
print(ans)

Solution (Python):
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):
n = int(input())
ans = 0
for a in range(1,n):
    ans += (n-1)//a
print(ans)

Solution (Python):

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

Solution (Python):


n = int(input())
cnt = 0
for i in range(1,n):
    cnt += int((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 base64
import subprocess
import zlib


exe_bin = "c%1E9e{dUhcK_;!V<mPZIXH<41dAZJm?XkV>|iJLVcAl$;^f2^JCIVsMwaAQM3!7>6&xl&I3?lsj3C@FG@YYu+H0?2rc=1~u4OtmhfTN`ZrU3|OPdys3s;~Lg-HT5I3bDp-gm!WX?LwX?r!=|XY%

open("./kyomu", 'wb').write(zlib.decompress(base64.b85decode(exe_bin)))
subprocess.run(["chmod +x ./kyomu"], shell=True)
subprocess.run(["./kyomu"], shell=True)

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

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

Solution (Python):
import math

n=int(input())
c=0

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

print(c)

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

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

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

Solution (Python):
n=int(input())
print(sum([n//a+(0 if n%a else -1) for a in range(1,n)]))

Solution (Python):


n = int(input())
ans = 0 

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

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

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

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

Solution (Python):
N=int(input())
a = 0
for A in range(1, N):




  a += (N-1)//A
print(a)

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

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

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

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
t = 0
J = 0
for i in range(1,n):
    for j in range(i,n):
        if i*j >= n:break
        if i == j : t+=1
        ans +=1
        J = j


print(2*ans -t)

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
t = 0
J = 0
for i in range(1,n):
    for j in range(i,n):
        if i*j >= n:break
        if i == j : t+=1
        ans +=1
        J = j
    if i*J >= n:break

print(2*ans -t)

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

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

print(ans)

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

Solution (Python):
import math
N = int(input())
A = [0]*(N)
for i in range(0,N):
    A[i] = math.floor((N-1)/(i+1))
print(sum(A))

Solution (Python):
n = int(input())
count = 0
for a in range(1, n+1):
  for b in range(a, n+1):
    if n > a * b:
      if a == b: count += 1
      else: count += 2
    else: break
print(count)

Solution (Python):
n = int(input())
count = 0
for a in range(1, n+1):
  for b in range(a, n+1):
    if n > a * b:
      if a == b: count += 1
      else: count += 2
    else: break
print(count)

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

result = 0

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

print(result)

Solution (Python):

import sys
import collections as cl


def II(): return int(sys.stdin.readline())


def MI(): return map(int, sys.stdin.readline().split())


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


def main():
    N = II()

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

    print(ans)


main()

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

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

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

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

ans = 0

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

print(int(ans))

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

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

print(answer)

Solution (Python):
import sys
sys.setrecursionlimit(1 << 25)
readline = sys.stdin.buffer.readline
read = sys.stdin.readline  
ra = range
enu = enumerate


def exit(*argv, **kwarg):
    print(*argv, **kwarg)
    sys.exit()


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))



def a_int(): return int(readline())


def ints(): return list(map(int, readline().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) 
    ret = []
    for _ in range(H):
        ret.append(list(map(int, readline().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, readline().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, readline().split())))
    return ret
    


MOD = 10**9 + 7
INF = 2**31  

from collections import defaultdict, Counter, deque
from operator import itemgetter, xor, add
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  
from functools import reduce
from math import gcd


class FastFactorization:
    def __init__(self, N: int):
        '''構築O(NloglogN)、クエリO(logN)'''
        self.N = N
        self.min_prime = self._make_minimum_prime()

    def _make_minimum_prime(self):
        
        min_prime = [x for x in range(self.N + 1)]
        
        
        for i in range(2, int(self.N ** 0.5) + 1):
            if min_prime[i] == i:  
                for j in range(2 * i, self.N + 1, i):  
                    if min_prime[j] == j:
                        min_prime[j] = i
        return min_prime

    def query(self, x: int):
        
        
        
        if x == 1:
            return Counter()  

        
        arr = []
        tmp = x
        while tmp != 1:
            p = self.min_prime[tmp]
            tmp //= p
            arr.append(p)
        return Counter(arr)
















N = a_int()
fact = FastFactorization(N + 1)
ans = 0
for x in range(1, N):
    tmp = 1
    for v in fact.query(x).values():
        tmp *= v + 1
    ans += tmp

print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)

readline = sys.stdin.buffer.readline
def readstr():return readline().rstrip().decode()
def readstrs():return list(readline().decode().split())
def readint():return int(readline())
def readints():return list(map(int,readline().split()))
def printrows(x):print('\n'.join(map(str,x)))
def printline(x):print(' '.join(map(str,x)))

n = readint()

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

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())


ans = 0

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

print(ans)

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

print(sum((N - 1) // i for i in range(1, N)))

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

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

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

print(ans)

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

Solution (Python):

import sys
n = int(input())
import math

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+1):
    b=1
    while n-a*b>0:
        ans += 1
        b+=1
print(ans)

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

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

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

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

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
cnt = 0
for a in range(1,N+1):
  b = N // a
  if a * b == N:
    cnt = cnt + b - 1
  else:
    cnt = cnt + b
print(cnt)

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

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

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

table = [0] * (n + 1)

for x in range(1, n + 1):
    for y in range(x, n + 1, x):
        table[y] += 1

res = 0
for c in range(1, n):
    res += table[c]

print(res)

Solution (Python):
import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush
import collections
import bisect

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):
N = int(input())
ans = 0
for i in range(1,N):
    ans += (N-1)//i
print(ans)

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

print(count)

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

print(res)

Solution (Python):

from typing import List


def input_int() -> int:
    return int(input())


def input_list_int() -> List[int]:
    return list(map(lambda x: int(x), input().split()))


def f(n: int) -> int:
    ans = 0
    for a in range(1, n):
        ans += (n - 1) // a
    return ans


if __name__ == '__main__':
    n = input_int()
    print(f(n))

Solution (Python):

import sys
input = sys.stdin.readline
from bisect import bisect_left;
from bisect import bisect_right;
from math import ceil, factorial;

def ceil(x):
    if x != int(x):
        x = int(x) + 1;
    return x;
    

def swaparr(arr, a,b):
    temp = arr[a];
    arr[a] = arr[b];
    arr[b] = temp;


def gcd(a,b):
    if b == 0:
        return a;
    return gcd(b, a % b);


def nCr(n, k, modulus = 1): 
    if(k > n - k): 
        k = n - k; 
    res = 1;
    for i in range(k): 
        res = res * (n - i);
        res = res / (i + 1);
        res %= modulus; 
    return int(res);


def primefs(n):
    
    primes = {}
    while(n%2 == 0 and n > 0):
        primes[2] = primes.get(2, 0) + 1
        n = n//2
    for i in range(3, int(n**0.5)+2, 2):
        while(n%i == 0 and n > 0):
            primes[i] = primes.get(i, 0) + 1
            n = n//i
    if n > 2:
        primes[n] = primes.get(n, 0) + 1
    
    
    return primes


def power(x, y, p): 
    res = 1
    x = x % p  
    if (x == 0) : 
        return 0
    while (y > 0) : 
        if ((y & 1) == 1) : 
            res = (res * x) % p 
        y = y >> 1      
        x = (x * x) % p 
    return res 


def swap(a,b):
    temp = a
    a = b
    b = temp
    return a,b;









def find(x, link):
    p = x;
    while( p != link[p]):
        p = link[p];
    
    while( x != p):
        nex = link[x];
        link[x] = p;
        x = nex;
    return p;




def union(x, y, link, size):
    x = find(x, link)
    y = find(y, link)
    if size[x] < size[y]:
        x,y = swap(x,y)
    if x != y:
        size[x] += size[y]
        link[y] = x


def sieve(n): 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1
    return prime


MAXN = int(1e6 + 5)
def spf_sieve():
    spf[1] = 1;
    for i in range(2, MAXN):
        spf[i] = i;
    for i in range(4, MAXN, 2):
        spf[i] = 2;
    for i in range(3, ceil(MAXN ** 0.5), 2):
        if spf[i] == i:
            for j in range(i*i, MAXN, i):
                if spf[j] == j:
                    spf[j] = i;
    


spf = [0 for i in range(MAXN)]
spf_sieve();
def factoriazation(x):
    ret = {};
    while x != 1:
        ret[spf[x]] = ret.get(spf[x], 0) + 1;
        x = x//spf[x]
    return ret;
    
    


def int_array():
    return list(map(int, input().strip().split()));

def float_array():
    return list(map(float, input().strip().split()));


def str_array():
    return input().strip().split();


MOD = int(1e9)+7;
CMOD = 998244353;
INF = float('inf'); NINF = -float('inf');




































n = int(input()); ans = 0;
for i in range(1, n):
    x = n - i; num = 1;
    this = factoriazation(x);
    for i in this:
        num *= (this[i] + 1);
    ans += num;
print(ans);

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 i in range(1,N):
  ans+=(N-1)//i
print(ans)

Solution (Python):
import math

N = int(input())

s = 0

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

print(s)

Solution (Python):
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(input())
prime = Prime(N + 100)

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

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

print(cnt)

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n = int(input())
    ans = 0
    for a in range(1,n):
        ans += -(-n//a) - 1
    print(ans)
        

if __name__=='__main__':
    main()

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n = int(input())
    ans = 0
    for a in range(1,n):
        ans += -(-n//a) - 1
    print(ans)
        

if __name__=='__main__':
    main()

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n = int(input())
    ans = 0
    for a in range(1,n):
        if a ** 2 >= n:
            break
        for b in range(a,n):
            if a * b >= n:
                break
            if a == b:
                ans += 1
            else:
                ans += 2
    print(ans)
        

if __name__=='__main__':
    main()

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

tot = 0

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

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 i in range(1,n):
  ans+=int((n-1)/i)
print(ans)

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


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


if __name__ == '__main__':
    solve()

Solution (Python):
import numpy as np

n = int(input())
count = np.zeros(n, dtype=np.int)
for d in range(1, n):
  count[d::d] += 1
print(count.sum())