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

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

Solution (Python):
n=int(input())
ar=3
sv=[0]*(10**6+2)
for i in range(2,len(sv)):
	if not sv[i]:
		sv[i]=i
		for j in range(2*i,len(sv),i):
			sv[j]=i
def di(x):
  an=1
  if sv[x]==x:
    return 2
  while x>1:
    ct=0;cr=sv[x]
    while x%cr==0:
      ct+=1;x//=cr
    an*=(ct+1)
  return an
for i in range(4,n+1):
  ar=ar+di(i-1)
if n==2:
  ar=1
print(ar)

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:
        ans += N//i-1
    else:
        ans += N//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 += int((N - 1) / a)

print(cnt)

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

Solution (Python):
import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush

sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplt(n): return [tuple(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

n = inp()

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

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

N = int(input())
tmp = 0

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

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 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("{}".format(ans))

Solution (Python):

N = int(input())

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

print(ans)

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

Ru = int(N**0.5)

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

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):
import sys
n = int(sys.stdin.readline().strip())


res = 0
"""
for i in range(1, n//2+1):
    if i ** 2 < n:
        res += 1
    for j in range(i+1, n//i+1):
        if i*j >= n:
            break
        res +=  2

print(res)
"""


res += int(n**0.5)
upperbound = int(n**0.5) + 1
if int(n**0.5) ** 2 == n:
    
    res -= 1
    upperbound = int(n**0.5)





for i in range(1, upperbound):
    if n % i == 0:
        half = n // i - 1 - i
    else:
        half = n//i - i
    res += half * 2
print(res)

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    N = I()
    ans = 0
    for a in range(1, 10**3+1):
        if a ** 2 >= N:
            continue
        b_num = N // a - a
        if a * (N // a) == N:
            b_num -= 1
        ans += b_num
    ans *= 2
    ans += int(math.sqrt(N))
    if int(math.sqrt(N)) ** 2 == N:
        ans -= 1
    print(ans)
main()

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

print(ans)

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n = I()
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):
    q,m=divmod(N,a)
    ans+=(N//a)-(m==0)
print(ans)

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

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

print(ans)

Solution (Python):
n=int(input())
  
def f(i):
  if n%i==0:
    return n//i-1
  else:
    return n//i

sum=0
for i in range(1,n):
  sum+=f(i)

print(sum)

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

Solution (Python):
def INT():
    return int(input())

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

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

N = INT()
ans = 0

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

Solution (Python):
n = int(input())
i,j=1,1
count=0

x = i*j
cc = n-x

while cc>=1:

	cnt=0
	while 1:
		p = i*j
		c = n - p
		if c>=1:
			
			j=j+1
			cnt+=1
		else:
			j=i
			break

	count=count+((cnt*2)-1)

	i=i+1
	j=j+1

	x = i*j
	cc = n-x


print(count)

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

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

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

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

Solution (Python):
N=int(input())
s=0
for i in range(1,N+1):
  s+=int(N/i)
  if N%i==0:
    s-=1
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())
count = 0
for a in range(1, n):
    count += (n - 0.5) // a
print(int(count))

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


def main():
    N = int(readline())
    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())

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

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

Solution (Python):
from math import ceil
n = int(input())
ans = 0
for i in range(1, n):
    for j in range(1, n // i + 1):
        if i * j != n:
            
            ans += 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())

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

Solution (Python):
import math

N = int(input())

result = 0
n = math.sqrt(N)
n = math.ceil(n)

for i in range(1, n + 1):
    for j in range(i, N // i + 1):
        if i * j < N:
            if i == j:
                result += 1
            else:
                result += 2
        else:
            break
print(result)

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

Solution (Python):
n = int(input())
D = [0] * n
for i in range(1, n):
    for j in range(i, n, i):
        D[j] += 1
print(sum(D))

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

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


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

Solution (Python):

import sys
from math import factorial, ceil, floor

MOD = 10 ** 9 + 7
INF = 10000000000


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

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

    
    print("{}".format(result))

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):
def func(N):
  result = 0

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

  return result

if __name__ == "__main__":
    N = int(input())
    print(func(N))

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

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

Solution (Python):
N = int(input())
count_eq = 0
count_df = 0
for i in range(1,N):
  for j in range(i,N):
    if i*j <= N-1:
      if i == j:
        count_eq += 1
      else :
      	count_df += 1
    else :
      break
print(count_eq + 2*count_df)

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

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

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

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

print(int(s))

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

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

print(ans)

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""
n = onem()

co = 0

for i in range(1,n):
    po = n // i
    co += po
    if i * po == n:
        co -= 1
print(co)

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

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

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):
ln=10**6+10
sieve=[i for i in range(ln)]
p=2
while p**2<=ln:
  if sieve[p]==p:
    for q in range(p*2,ln,p):
      if sieve[q]==q:
        sieve[q]=p
  p+=1
import collections
def primef(n):
  prime_count=collections.Counter()    
  while n>1:
    prime_count[sieve[n]]+=1
    n//=sieve[n]   
  return prime_count
n=int(input())
ans=0
for i in range(1,n):
  t=1
  for j in primef(i).values():
    t=t*(j+1)
  ans+=t
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
a=1
while(a*a<n):
    cnt+=1
    cnt+=max((n-1)//a-a,0)*2
    a+=1
print(cnt)

Solution (Python):
n=int(input())
cnt=0
a=1
while(a*a<n):
    cnt+=1
    a+=1
a=1
while(a*a<n):
    cnt+=max((n-1)//a-a,0)*2
    a+=1
print(cnt)

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

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

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

l=num_divisors_table(N-1)
print(sum(l))

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

print(ans)

Solution (Python):
import sys

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

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

print(cnt)

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

Solution (Python):



def findDivisors(n):
    
    
    div = [0 for i in range(n + 1)]

    
    for i in range(1, n + 1):

        
        
        for j in range(1, n + 1):
            if j * i <= n:
                div[i * j] += 1
            else:
                break

    
    return div

    


if __name__ == "__main__":
    n = int(input())
    print(sum(findDivisors(n-1)))

Solution (Python):
import sys
import math
from collections import defaultdict, deque, Counter
from copy import deepcopy
from bisect import bisect, bisect_right, bisect_left
from heapq import heapify, heappop, heappush
    
input = sys.stdin.readline
def RD(): return input().rstrip()
def F(): return float(input().rstrip())
def I(): return int(input().rstrip())
def MI(): return map(int, input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def LF(): return list(map(float,input().split()))
def Init(H, W, num): return [[num for i in range(W)] for j in range(H)]
    
    
def main():
    N = I()
    res = 0
    for i in range(1, N+1):
        res += N // i
        if N % i == 0:
            res -= 1
    print(res)
    
if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
ans = 0
'''
A*B<=N-1となるAとBの組み合わせが何通りあるかを調べること
この考えを導きだせるかが、この問題を解くカギとなる
Cの最小値1を右辺に移項してN-1となっている
不等式となっている点がポイント
Cの最小値1としておけばAとBの組み合わせを全部考えることができる
次に、AとBどちらでも良いが、あるA（もしくはB）が1つの値を決めたときに、
それに対応するB（もしくはA）が何通りあるかを計算して、A（もしくはB）の値をn-1まで
計算して足してあげれば答えとなる
とてもシンプルなコードだけどこれでACとなるはず
'''

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

Solution (Python):
def slove():
    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 = slove()
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 int_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(map(int,input().split())))
    return np.array(x)

def str_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(input()))
    return np.array(x)

def int_map():
    return map(int,input().split())

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

def print_space(l):
    return print(" ".join([str(x) for x in l]))


import numpy as np
import collections as col

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)

Solution (Python):
N = int(input())
cnt = 0
for A in range(1, N + 1):
	for B in range(1, N // A + 1):
		C = N - A * B
		if C >= 1 and A * B + C == N:
			cnt += 1
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 i in range(1,n):
    s = (n-1)//i
    if  0< s < n:
        ans += s
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())
x=0
for i in range(n):
    if i==0:
        continue
    elif n//i==n/i:
        x+=(n//i)-1
    else:
        x+=n//i
     
print(x)

Solution (Python):
def main():
    N = int(input())
    count = 0
    for a in range(N) :
        a += 1
        for b in range(N):
            b += 1
            c = N - a * b
            if c <= 0 :
                break
            else :
                count += 1

    print(count)

if __name__ == '__main__':
    main()

Solution (Python):


import math

import itertools
from collections import deque
from collections import Counter
import heapq
from fractions  import gcd


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())
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
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):
    if n%i==0:
        ans += n//i
        ans -= 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):
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()) - 1 
c, x = 0, 1
while x*x <= n:
    c += (n//x - x)*2 + 1
    x += 1
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()) - 1 
print(sum([(n//x - x)*2 + 1 for x in range(1, int(n**0.5) + 1)]))

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce, lru_cache
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def TUPLE(): return tuple(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = 10**6
mod = 10 ** 9 + 7 





N = INT()

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

print(cnt)

Solution (Python):
n=int(input())
count=0
for i in range(1000010):
  if i==0:
    continue
  for j in range(1000010):
    if j==0:
      continue
    elif i*j<n:
      count+=1
    else:
      break
print(int(count))

Solution (Python):


import sys

def main():
    n = int(input())
    ans=0
    b=0

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

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

	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):
    
    cnt += (N - 1) // a

print(cnt)

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

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


if __name__ == '__main__':
    print(main())

Solution (Python):

n=int(input())


def p(val):
    print(val)

count = 0



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

    

        
p(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())
import math
ans = 0
for i in range(1, n+1):
    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):
from functools import lru_cache
N = int(input())

count = 0

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

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

Solution (Python):
from collections import defaultdict
N=int(input())


def factorize(M):
  res=defaultdict(int)
  
  for i in prime_list:  
    if M==1:
      break
    while M%i==0:
      M//=i
      res[i]+=1  
  if M!=1:
    res[M]=1
  return res


def prime_sieve(n):
  prime_list=[True]*n
  prime_list[0]=False
  prime_list[1]=False
  for i in range(2,int(n**0.5)+1):
    if not prime_list[i]:
      continue
    else:
      for j in range(i**2,n,i):
        prime_list[j]=False
  return [i for i in range(n) if prime_list[i]]

prime_list=prime_sieve(int(N**0.5)+1)
answer=0
for i in range(1,N):
  facts=factorize(i)
  
  num_div=1
  for k,v in facts.items():
    num_div*=v+1
  answer+=num_div
  
print(answer)

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

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

except Exception:
  pass

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

print(ans)

Solution (Python):
N=int(input())
count = 0
for a in range(1,N):
	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):
N=int(input())
 
div = [0] * (N+1)
for d in range(1, N+1):
  for n in range(d, N, d):
      div[n] += 1
 
ans = sum(div[: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())

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

Solution (Python):
n = int(input())
answer = 0
for idx1 in range(1, n+1):
    for idx2 in range(1, ((n+1) // idx1) + 1):
        c = n - (idx1 * idx2)
        if 1 <= c < n:
            answer += 1

print(answer)

Solution (Python):
from bisect import bisect_right

N = int(input())
num = [i for i in range(1, N)]
cnt = 0
for a in range(1, N):
    n = (N - 1) // a
    b = bisect_right(num, n)
    cnt += b

print(cnt)

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

Solution (Python):
















N = int(input())
ans = 0




for B in range(1, N+1):
	ans += N//B
	if N%B == 0:
		ans -= 1


print(ans)

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

for i in range(1,number):
  temp = number -1
  temp_solution = int(temp/i)
  count += temp_solution
print(count)

Solution (Python):


class PrimeFactor():
    def __init__(self, n):
        '''
            Note:
                make the table of Eratosthenes' sieve
                and minFactor[] for fast_factorization.
        '''
        self.n = n
        self.table = [True for _ in range(n+1)]
        self.table[0] = self.table[1] = False
        self.minFactor = [-1 for _ in range(n+1)]

        for i in range(2, n+1):
            if not self.table[i]: continue
            self.minFactor[i] = i 
            for j in range(i*i, n+1, i): 
                self.table[j] = False
                self.minFactor[j] = i 
    
    def fast_factorization(self, n):
        '''
            Note:
                factorization
                return the form of {factor: num}.
        '''
        data = {}
        while n > 1:
            if self.minFactor[n] not in data:
                data[self.minFactor[n]] = 1 
            else:
                data[self.minFactor[n]] += 1
            n //= self.minFactor[n]
        return data

    def count_divisors(self, n):
        '''
            Note:
                return the number of divisors of n.
        '''
        ret = 1 
        for v in self.fast_factorization(n).values():
            ret *= (v+1)
        return ret 

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

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