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 readInt():
    return int(input())
def readList():
    return list(map(int,input().split()))
def readMap():
	return map(int,input().split())
def readStr():
    return input()
inf=float('inf')
mod = 10**9+7
import math
from itertools import permutations
def solve(N):
    count=0
    for i in range(1,N):
        count+=(N-1)//i
    return count

N=readInt()
print(solve(N))

Solution (Python):

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



import sys
input = sys.stdin.readline  

N = int(input())
ans =divisor_num(N)

print(ans)

Solution (Python):

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



import sys
input = sys.stdin.readline  

N = int(input())
ans =divisor_num(N)

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

Solution (Python):
def main():
    n = int(input())
    ab_max = n-1
    ans = sum(ab_max // a for a in range(1, n))
    return ans


if __name__ == '__main__':
    print(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())

an=0
for j in range(1,n):
    an+=int((n-1)/j)    
print(an)

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):
    for b in range(1,N):
        if a * b >= N:
            break
        else:
            cnt +=1
print(cnt)

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

Solution (Python):









def solve():
    n = int(input())
    cnt = 0
    for i in range(1, n + 1):
        k = n // i
        if n % i:
            cnt += k
        else:
            cnt += max(0, k - 1)
    print(cnt)
    return

def main():
    t = 1
    
    for _ in range(t):
        solve()

if __name__ == "__main__":
    main()

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

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

Solution (Python):
class factorization:
    def __init__(self, N=1_000_010):
        """min_factor[i] = iの最小の素因数"""
        self.min_factor = list(range(N))
        for i in range(2, N):
            if i * i > N:
                break
            for j in range(i * i, N, i):
                if self.min_factor[j] == j:
                    
                    self.min_factor[j] = i

    def fact(self, n):
        """nの素因数分解の結果を{素因数:回数}で返す"""
        d = {}
        while n > 1:
            if self.min_factor[n] in d:
                d[self.min_factor[n]] += 1
            else:
                d[self.min_factor[n]] = 1
            n //= self.min_factor[n]
        return d

    def count_divisors(self, n):
        res = 1
        for v in self.fact(n).values():
            res *= v + 1
        return res

    def sum_divisors(self, n):
        res = 1
        for r, Len in self.fact(n).items():
            res *= (r ** (Len + 1) - 1) // (r - 1)
        return res

    def Eulers_function(self, n):
        res = 1
        for i in self.fact(n):
            res *= (i - 1)
            n //= i
        return res * n


n = int(input())
ans = 0
p = factorization(n)
for i in range(1, n):
    ans += p.count_divisors(i)
print(ans)

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

answer = 0

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

print(int(answer))

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

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

Solution (Python):
import math

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

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

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

 
 
print(count)

Solution (Python):
import math

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

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

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


print(count)

Solution (Python):
import math

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

Solution (Python):
from math import ceil
ans = 0
n = int(input())
for a in range(1, n + 1):
    for b in range(a+1, n + 1):
        c = n - a * b
        if c > 0:
            ans += 2
        else:
            break
for a in range(1, ceil(n**0.5) + 1):
        c = n - a * a
        if c > 0:
            ans += 1
        else:
            break
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())

answer = 0
for n in range(1, int(N**0.5)+1):
  m = N//n if N%n != 0 else N//n-1
  if m >= n:
    answer += (m-n+1)*2-1
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())

count = 0

count += int(N/2)

if int(N/2)-N/2 == 0:
    for i in range(1,int(N/2)):
        if int(N/i)-N/i == 0:
            count += int(N/i)-1
        else:
            count += int(N/i)
else:
    for i in range(1,int(N/2)+1):
        if int(N/i)-N/i == 0:
            count += int(N/i)-1
        else:
            count += int(N/i)

print(count)

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

count += int(N/2)
print(count)

Solution (Python):
def main():
    import sys
    ikimasu = sys.stdin.buffer.readline
    ini = lambda: int(ins())
    ina = lambda: list(map(int, ikimasu().split()))
    ins = lambda: ikimasu().strip()
    
    n = ini()
    rick = 0
    import math
    for i in range(1,n+1):
        rick+=math.floor((n-1)/i)
    print(rick)
        


    
        


        


    




















if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
NR = int(N**0.5)
count = 0
if int(N/2)-N/2 == 0:
    for i in range(1,int(N/2)):
        if int(N/i)-N/i == 0:
            count += int(N/i)-1
        else:
            count += int(N/i)
else:
    for i in range(1,int(N/2)+1):
        if int(N/i)-N/i == 0:
            count += int(N/i)-1
        else:
            count += int(N/i)

count += int(N/2)
print(count)

Solution (Python):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    n = int(input())
    r = 0
    for i1 in range(1, n+1):
        for i2 in range(1, n+1):
            if i1 * i2 >= n:
                break
            else:
                r += 1
    print(r)

if __name__ == '__main__':
    main()

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

Solution (Python):
def solve1():
    n = int(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(input())
    ans = 0

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

    print(ans)


solve2()

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

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

print(ans)

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

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

Solution (Python):
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
import random

F=[1]*(10**6+1)
for i in range(2,10**6+1):
    for j in range(i,10**6+1,i):
        F[j]+=1
ans=0
n=int(input())
for c in range(1,n):
    ans+=F[n-c]
print(ans)

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

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

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

s = 0
m = N//2 if N%2 == 0 else N//2 + 1
for n in range(1, m):
    s += (N//n if N%n != 0 else N//n - 1)

print(s+N//2)

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

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

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

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

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

Solution (Python):
import numpy as np
from numba import njit

@njit
def get_div_nums(n):
    divs = np.ones(n+1, dtype=np.int64)
    for i in range(2, n):
        divs[i::i] += 1
    return divs

def main():
    N = int(input())
    divs = get_div_nums(N)
    ans = divs[:N].sum()-1
    print(ans)
    

if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
m=n-1

p=int(m**(1/2))
c=0

for i in range(1,p+1):
        c+=(m//i-(i-1))*2-1
        
print(c)

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

Solution (Python):
def Next(): return input()
def NextInt(): return int(Next())
def NextInts(): return map(int,input().split())
def Nexts(): return map(str,input().split())
def NextIntList(): return list(map(int,input().split()))
def RowInts(n): return [input() for i in range(n)]

n = NextInt()
ans = 0
for i in range(1, n):
    now = i
    while now < n:
        now += i
        ans += 1
print(ans)

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

Solution (Python):








N = int(input())









































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

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

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

Solution (Python):
n = int(input())
answer = sum([(n - 1) // a for a in range(1, n)])
print(answer)

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

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

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())
ans = 0

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

Solution (Python):
from functools import reduce
from operator import add
n=int(input())
print(reduce(add, ((n-1)//a for a in range(1,n))))

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

Solution (Python):
def func(x):
    ans = 0
    for a in range(1, n):
        for b in range(1, n):
            c = n - a * b
            if c <= 0:
                break
            ans += 1
    return ans

n = int(input())
print(func(n))

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

Solution (Python):


import math


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

    Returns:\n
        int: 標準入力
    """
    N = int(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)

Solution (Python):
N=int(input())
x = N
n = 1
s = 0
while x > 0:
    x = (N-1)//n
    s += x
    n+=1
print(s)

Solution (Python):

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

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

    print(ans)


if __name__ == "__main__":
    resolve()

Solution (Python):








if __name__ == "__main__":
    from sys import stdin as inp, stdout as out,setrecursionlimit as srl
    from collections import Counter,defaultdict,deque
    from heapq import *
    for _ in xrange(1):
        n=input()
        t=int(pow(n,0.5))+1
        c=Counter()
        for i in xrange(1,t+1):
          for j in xrange(i*i,n+1,i):
            c[j]+=1
        print 2*sum(c[i] for i in xrange(1,n))-int(pow(n-1,0.5))

Solution (Python):
'''
自宅用PCでの解答
'''
import math

import itertools
import queue
import bisect
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit


ipt = stdin.readline
setrecursionlimit(10**7)
mod = 10**9+7

dir = [(-1,0),(0,-1),(1,0),(0,1)]
alp = "abcdefghijklmnopqrstuvwxyz"
INF = 1<<32-1


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

    print(ans)

    return None

if __name__ == '__main__':
    main()

Solution (Python):
import sys
from sys import stdin,stdout
import math
import random
import heapq
from collections import Counter
from functools import lru_cache





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



    
except EOFError as e:
    print(e)

Solution (Python):

n = int(input())

res = 0


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

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

Solution (Python):
def solve():
    ans = 0
    for a in range(1, N):
        for b in range(1, N):
            c = N - a * b
            if c <= 0:
                break
            ans += 1
    return ans


N = int(input())
ans = solve()
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):
def ri():
    return int(input())


def rii():
    return [int(v) for v in input().split()]


def solve():
    N = ri()
    ans = 0
    for a in range(1, N):
        b = 1
        while b * a < N:
            ans += 1
            b += 1
    print(ans)


if __name__ == "__main__":
    solve()

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


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

    answer = 0
    for a in range(1, math.ceil(N**(1 / 2))):
        for b in range(a, N):
            c = (N - a * b)
            if c <= 0:
                break
            if a != b:
                answer += 2
            else:
                answer += 1
    print(answer)


if __name__ == "__main__":
    main()

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

print(ans)

Solution (Python):


import sys
iim = lambda: 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()

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

ans = 0

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

print(ans)

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

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

total = 0

for i in range(1, 10**6 + 1):
    for j in range(1, 10**6 + 1):
        m = n - i * j
        if m > 0:
            total += 1
        else:
            break

print(total)

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

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

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

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

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

print(result)

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

Solution (Python):
N = int(input())
 
N_1 = N - 1
counts = 0
i = 1
j = 1
while i <= N_1:
    while j <= N_1:
        if i * j <=  N_1:
            counts = counts + 1
        else:
            j = N_1
        j = j + 1
    j = 1
    i = i + 1
 
print(counts)

Solution (Python):
import sys

N = int(sys.stdin.readline())

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

Solution (Python):
import sys
import math
from collections import defaultdict
from collections import deque

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()


def main():
    N = NI()
    ans = 0
    for a in range(1, N):
        ans += N // a
        if N % a == 0:
            ans -= 1
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N = int(readline())
    ans = 0

    for a in range(1, N):
        for b in range(1, N):
            x = a * b
            if x >= N:
                break
            ans += 1

    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(3,n):
  for j in range(1,n//i+1):
    if i * j < n:
      cnt +=1
      
print(cnt+n-1+(n-1)//2)

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

Solution (Python):
import collections
MAXN = 10**6+10
sieve = [i for i in range(MAXN+1)]
p = 2
while p*p <= MAXN:
    if sieve[p] == p:
        for q in range(2*p,MAXN+1,p):
            if sieve[q] == q:
                sieve[q] = p
    p += 1
    
def prime(a):
    tmp = []
    while a > 1:
        tmp.append(sieve[a])
        a //= sieve[a]
    return collections.Counter(tmp)
 
def main():
    N = int(input())
    ans = 0
    for c in range(1, N):
        p = prime(N - c)
        tmp = 1
        for v in p.values():
            tmp *= (v + 1)
        ans += tmp
    return ans
 
if __name__ == '__main__':
    print(main())

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

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

print(cnt)

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

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

k=0

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

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

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):
    ans+=(n - 1)//a
print(ans)

Solution (Python):

import sys
import numpy as np
import numba
from numba import njit, b1, i4, i8, f8

input = sys.stdin.readline


def I():
    return int(input())


@njit((i8,), cache=True)
def main(n):
    table = np.zeros(n, np.int64)

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

    ans = 0
    for n in table[1:]:
        q, r = divmod(n, 2)
        ans += q * 2 + 1 * r

    return ans


N = I()

print(int(main(N)))

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()) -1
ans = 0

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

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

dp = [1]*(n)
dp[0] = 0

for i in range(2, n):
  for j in range(i, n, i):
    dp[j] += 1
    
print(sum(dp))

Solution (Python):

def yakusu_num(N):
    ans =0
    for i in range(1,N+1):
        ans +=N//i 
    return ans



import sys
input = sys.stdin.readline  

N = int(input())
ans =yakusu_num(N-1)

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())-1;print(sum(n//-~i for i in range(n)))

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


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

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


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

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

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

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

print(ans)

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

total = 0
for i in range(1, n + 1):
    j = n // i
    if n % i == 0:
        j -= 1
    total += j

print(total)

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

total = 0
for i in range(1, n + 1):
    j = n // i
    if n % i == 0:
        j -= 1
    total += j

print(total)

Solution (Python):
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))



def floor(a,b):
    return a//b

N = I()

ans = 0

for i in range(1,10**6+1):
    ans += floor((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):
    cnt += ((n - 1) // a)

print(cnt)

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())
ans = 0
for a in range (1,n):
    for b in range(1, n):
        if n <= a * b:
            break
        ans += 1
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):
    ans += (N - 1) // A

print(ans)

Solution (Python):
M = 10 ** 6
d = [0] * (M+1)

for a in range(1, M+1):
    for b in range(a, M+1):
        n = a * b
        if n > M:
            break
        d[n] += 2 - (a==b)


N = int(input())
ans = 0
for c in range(1, N):
    ans += d[N - c]

print(ans)

Solution (Python):
def get_sieve_of_eratosthenes(n):
    if not isinstance(n, int):
        raise TypeError("n is int-type.")
    if n < 2:
        raise ValueError("n is more than 2")
    data = [i for i in range(2, n + 1)]
    for d in data:
        data = [x for x in data if (x == d or x % d != 0)]
    return data
 
p_list = get_sieve_of_eratosthenes(10**3)
 
def factorization_counta(n):
    arr = []
    temp = n
    for i in p_list:
        if i * i > n:
            break
        elif temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append(cnt)
            
    if temp != 1:
        arr.append(1)
    if arr == []:
        arr.append(1)
    return arr

def main():
    N = int(input())
    ans = 1
    for c in range(2, N):
        p = factorization_counta(c)
        tmp = 1
        for v in p:
            tmp *= (v + 1)
        ans += tmp
    return ans
 
if __name__ == '__main__':
    print(main())

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

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

    numDivs = [0] * (N+1)
    for div in range(1, N+1):
        for x in range(div, N+1, div):
            numDivs[x] += 1

    ans = 0
    for C in range(1, N+1):
        ans += numDivs[N-C]

    print(ans)


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

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

Solution (Python):

def main():
    N = int(input())
    num = 0
    B = 1

    for A in range(1, N):
        for B in range(1, N):
            if N - A * B >= 1:
                num = num + 1
            else:
                break

    print(num)


main()

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

Solution (Python):
import math

N = int(input())
ans = 0
for A in range(1, N):
    lb = 1
    ub = math.ceil(N / A) - 1
    
    ans += ub - lb + 1
print(ans)

Solution (Python):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy

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

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

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-1)//a)+1):
        c = n - a*b
        if c <= 0: break
        cnt += 1
print(cnt)

Solution (Python):
N = int(input())
L = [0]*(N)
for i in range(1,N):
    for j in range(1,(N-1)//i+1):
        L[j*i]+=1
print(sum(L))

Solution (Python):
N=int(input())-1
ans=0
for i in range(1,N+1):
    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):
N = int(input())
ans = 0
for a in range(1, N + 1):
    for b in range(1, N + 1):
        if a * b <= N - 1:
            ans += 1
        else:
            break
print(ans)

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

count = 0
for i in range(1,N+1):
    for j in range(1,N+1):
        if N - i*j >= 1:
            count += 1
        else:
            break

print(count)

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())


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

Solution (Python):
import math
N = int(input())
ans = 0
ve = math.floor(math.sqrt(N))
for st in range(ve):
    tmp = math.floor(N/(st+1)-0.000001)
    score = 2*(tmp - st)
    if score > 0:
        score -= 1
    ans += score
print(ans)

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

Solution (Python):
import math


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 A in range(1,N):
    for B in range(1,N):
        if A*B >= N:
            break
        else:
            cnt+=1
print(cnt)

Solution (Python):
N=int(input())
print(sum([((N-1)//1)//i for i in range(1, N)]))

Solution (Python):
import sys

N = int(input())

result = 0
for a in range(1, N):
    if N % a == 0:
        b_count = N // a - 1
    else:
        b_count = N // a
    result += b_count

print(result)

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

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):
def num_divisors_table(n):
    table = [0] * (n + 1)
    
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1
    
    return table
n=int(input())
print(sum(num_divisors_table(n-1)))