CodeEff/ECCO huggingface dataset:
# Original solution
n = int(eval(input()))
a = [int(eval(input())) for _ in range(n)]
b = sorted(a)
counter = 0
for i in range(0, n, 2):
    if a.index(b[i])%2 == 1:
        counter += 1
print(counter)

# Optimized solution
def main():
    n = int(eval(input()))
    a = [int(eval(input())) for _ in range(n)]
    b = sorted(a)
    c = b[::2]
    d = a[::2]
    set_c = set(c)
    set_d = set(d)
    print((len(set_c - set_d)))
main()
# Original solution
def solve():
    n = int(eval(input()))
    a = [0] * n
    indices = {}
    for i in range(n):
        a[i] = int(eval(input()))
        indices[a[i]] = i
    b = sorted(a)
    for j in range(n - 1, -1, -1):
        i = indices[b[j]]
        while i + 2 < n and a[i] > a[i + 2]:
            tmp = a[i + 2]
            a[i + 2] = a[i]
            a[i] = tmp
            indices[a[i]] = i
            indices[a[i + 2]] = i + 2
            i += 2
    ans = 0
    for i in range(n - 1):
        if a[i] != b[i]:
            ans += 1
            tmp = a[i + 1]
            a[i + 1] = a[i]
            a[i] = tmp
    print(ans)


def main():
    solve()


if __name__ == '__main__':
    main()


# Optimized solution
def solve():
    n = int(eval(input()))
    a = [int(eval(input())) for _ in range(n)]
    e = [a[i] for i in range(0, n, 2)]
    a.sort()
    o = set(a[i] for i in range(1, n, 2))
    ans = 0
    for i in range((n + 1) // 2):
        if e[i] in o:
            ans += 1
    print(ans)


def main():
    solve()


if __name__ == '__main__':
    main()
# Original solution
import sys
#import numpy as np

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split())) # applies to numbers only
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

N = ri()
A = [ri() for _ in range(N)]
x_to_i = {x:i for i, x in enumerate(sorted(A))}
rank = [x_to_i[x] for x in A]
answer = sum(i&1 and (i^x)&1 for i,x in enumerate(rank))
print(answer)


# Optimized solution
import sys
#import numpy as np

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split())) # applies to numbers only
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

N = ri()
A = [ri() for _ in range(N)]
x_to_i = {x:i for i, x in enumerate(sorted(A))}
rank = [x_to_i[x] for x in A]
answer = sum((i^x)&1 for i,x in enumerate(rank)) // 2
print(answer)
# Original solution
n = int(eval(input()))
a = [int(eval(input())) for i in range(n)]
b,ans = sorted(a),0
for i in range(n):
	if i%2!=b.index(a[i])%2: ans+=1
print((ans//2))

# Optimized solution
n = int(eval(input()))
a = [int(eval(input())) for i in range(n)]
b,ans = [],0
for i,x in enumerate(a): b.append([x,i])
b.sort()
for i in range(n):
	if i%2!=b[i][1]%2: ans+=1
print((ans//2))
# Original solution
n = int(eval(input()))
s = [int(eval(input())) for _ in range(n)]
os = [s[i] for i in range(0,n,2)]
j = sorted(s)
ans = 0
for i in os:
    if j.index(i) % 2 == 1:
        ans += 1
print(ans)

# Optimized solution
n = int(eval(input()))
s = [int(eval(input())) for _ in range(n)]
j = sorted(s)
ans = len(set(s[::2]) ^ set(j[::2])) // 2
print(ans)
# Original solution
n = eval(input())
l1 = []

for i in range(n):
	t = eval(input())
	l1.append(t)

l2 = sorted(l1)

s = []

for i in range(n):
	if i % 2 == 1:
		s.append(l1[i])

count = 0

for i in range(n):
	if i % 2 == 1:
		if l2[i] not in s:
			count += 1

print(count)


# Optimized solution
n = eval(input())
l1 = []

for i in range(n):
	t = eval(input())
	l1.append(t)

l2 = sorted(l1)

s1, s2 = set([]), set([])

for i in range(n):
	if i % 2 == 1:
		s1.add(l1[i])
		s2.add(l2[i])

print(len(s1) - len(s1.intersection(s2)))
# Original solution
n = int(eval(input()))
a = [int(eval(input())) for _ in range(n)]
b = sorted(a)

c = dict()
for i in range(n):
    c[b[i]] = i&1

d = 0
for i in range(n):
    d += c[a[i]]^i&1

print((d>>1))

# Optimized solution
n, *a = list(map(int, open(0).read().split()))

b = []
for i in range(n):
    b.append((a[i], i))
b.sort()

ans = 0
for i in range(n):
    if b[i][1] % 2 != i % 2:
        ans += 1
print((ans // 2))
# Original solution
n=int(eval(input()))

count=0
for a in range(1,n+1):
    for b in range(1,n//a+1):
        c=n-(a*b)
        if c>0:
            count+=1
        else:
            continue

print(count)

# Optimized solution
n=int(eval(input()))

count=0
for a in range(1,n+1):
    for b in range(a,n//a+1):
        c=n-(a*b)
        if c>0:
            if a==b:
                count+=1
            else:
                count+=2
        else:
            continue

print(count)
# Original solution
import sys
input = sys.stdin.readline

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

    count = [0]*(n)

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


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

if __name__ == "__main__":
  main()
# Original solution
import math
N = int(eval(input()))
z = 0
for a in range(N):
    for b in range(math.floor(N/(a+1))):
        c = N - (a+1)*(b+1)
        if c > 0:
            z = z+1
        else:
            pass
print(z)

# Optimized solution
import math
N = int(eval(input()))
z = 0
for a in range(N):
    d = math.floor(N/(a+1))
    e = min(a,d)
    for b in range(e):
        c = N - (a+1)*(b+1)
        if c > 0:
            z = z+2
        else:
            pass
    f = N - (a+1)*(a+1)
    if f > 0:
        z = z+1
    else:
        pass
print(z)
# Original solution
import math
N = int(eval(input()))
z = 0
for a in range(N):
    e = min(a,math.floor(N/(a+1)))
    for b in range(e):
        if N - (a+1)*(b+1) > 0:
            z = z+2
        else:
            pass
    if N - (a+1)*(a+1) > 0:
        z = z+1
    else:
        pass
print(z)

# Optimized solution
import math
N = int(eval(input()))
z = 0
for a in range(N):
    for b in range(min(a,math.floor(N/(a+1)))):
        if N - (a+1)*(b+1) > 0:
            z = z+2
        else:
            pass
    if N - (a+1)*(a+1) > 0:
        z = z+1
    else:
        pass
print(z)
# Original solution
N=int(eval(input()))

cnt=0

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

print(cnt)


# Optimized solution
N=int(eval(input()))

cnt=0

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

print(cnt)
# Original solution
c=int(eval(input()))
arr=[1 for i in range(c)]
arr[0]=0
for i in range(2,c+1):
    j=i
    while j<c:
        arr[j]+=1
        j+=i
print((sum(arr)))
    


# Optimized solution
c=int(eval(input()))
total=c-1
for i in range(2,c):
    total+=(c-1)//i
print(total)
# Original solution
N = int(eval(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)


# Optimized solution
N = int(eval(input()))
cnt = 0
for A in range(1,N):
    cnt += (N-1) // A
print(cnt)
# Original solution
from sys import stdin
from collections import defaultdict
readline = stdin.readline
def i_input(): return int(readline().rstrip())
def i_map(): return list(map(int, readline().rstrip().split()))
def i_list(): return list(i_map())


def main():
    N = i_input()
    d = defaultdict(lambda: 1)
    ans = 0
    for i in range(2, N):
        for j in range(i, N, i):
            d[j] += 1
    for c in range(1, N):
        ans += d[c]
    print(ans)

if __name__ == "__main__":
    main()


# Optimized solution
from sys import stdin
readline = stdin.readline
def i_input(): return int(readline().rstrip())
def i_map(): return list(map(int, readline().rstrip().split()))
def i_list(): return list(i_map())


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

if __name__ == "__main__":
    main()
# Original solution
N = int(eval(input()))

a = 1
b = 1
ans = 0

while a<N:
    b = 1
    while a*b <N:
        ans += 1
        b += 1
    a+=1
print(ans)

# Optimized solution
N = int(eval(input()))

a = 1
ans = 0

while a< N:
    b = a+1
    while a*b < N:
        ans += 2
        b += 1
    a+=1
a=1
while a**2 < N:
    ans+=1
    a += 1
print(ans)
# Original solution
N=int(eval(input()))

# 約数の個数のテーブルを O(N logN) で作る
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)

# Optimized solution
N=int(eval(input()))

# 約数の個数のテーブルを O(N loglog N) で作る
div = [1] * (N+1)
div[0] = 0

for p in range(2, N+1):
  if div[p] != 1:
    continue
  # p は素数
  pp = p  # power of p
  e = 1
  while pp <= N:
    for n in range(pp, N+1, pp):
      div[n] += div[n] // e
    e += 1
    pp *= p  

ans = sum(div[:N])
print(ans)
# Original solution
N=int(eval(input()))

# 約数の個数のテーブルを O(N loglog N) で作る
div = [1] * (N+1)
div[0] = 0

for p in range(2, N+1):
  if div[p] != 1:
    continue
  # p は素数
  pp = p  # power of p
  e = 1
  while pp <= N:
    for n in range(pp, N+1, pp):
      div[n] += div[n] // e
    e += 1
    pp *= p  

ans = sum(div[:N])
print(ans)

# Optimized solution
"""O(N^0.5) solution"""

N = int(eval(input()))
N -= 1

ans = 0
n = int(N**.5)
for x in range(1, n+1):
  # (x,x)
  ans += 1
  # (x,y)
  ans += N//x - x
  # (y,x)
  ans += N//x - x

print(ans)
# Original solution
N = int(eval(input()))
 
yakusu = [0] * (N)
for i in range(1,N):
    for j in range(1,min(i, int((N-1)/i))+1):
      M = i*j
      if i == j:
        yakusu[M] += 1
      else:
        yakusu[M] += 2

print((sum(yakusu[1:N])))

# Optimized solution
N = int(eval(input()))

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

print(counter)
# Original solution
n = int(eval(input()))
count = 0

for i in range(1,n):
  for j in range(1,n):
    if i * j > n-1:
      break
    count += 1
    
print(count)

# Optimized solution
n = int(eval(input()))
count = 0

for i in range(1,n):
  a = n //i
  if n%i ==  0:
    count += a-1
  else:
    count += a
    
print(count)
# Original solution
n = int(eval(input()))
cnt =[0]*(n+1)
ans = 0

for i in range(1,n):
    m = (n-1)//i
    for j in range(1,m+1):
        cnt[i*j] += 1
        
for i in range(1,n+1):
    ans += cnt[i]
    
print(ans)

# Optimized solution
n = int(eval(input()))
cnt =[0]*(n+1)
ans = 0

for i in range(1,n):
    m = (n-1)//i
    for j in range(1,m+1):
        ans += 1
        
print(ans)
# Original solution
N=int(eval(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)))

# Optimized solution
n=int(eval(input()))
cnt=0
for a in range(1,n):
    cnt+=(n-1)//a
print(cnt)
# Original solution
n=int(eval(input()))
cnt=0
for a in range(1,n):
    cnt+=(n-1)//a
print(cnt)

# Optimized solution
n=int(eval(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)
# Original solution
n=int(eval(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)

# Optimized solution
n=int(eval(input()))
cnt=0
a=1
while(a*a<n):
    cnt+=1
    cnt+=max((n-1)//a-a,0)*2
    a+=1
print(cnt)
# Original solution
n = int(eval(input()))

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

print(cnt)

# Optimized solution
n = int(eval(input()))

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

print(cnt)
# Original solution
n = int(eval(input()))
a=1
x=0
for i in range(n-1):
    b=1
    while a*b < n:
        x += 1
        b += 1
    a += 1
print(x)

# Optimized solution
n = int(eval(input()))
a=1
x=0
for i in range(n-1):
    x += (n-1)//a
    a += 1
print(x)
# Original solution
n=int(eval(input()))
a=0
for i in range(1,n):
  a+=(n-1)//i
print(a)

# Optimized solution
n=int(eval(input()))-1
print((sum(n//-~i for i in range(n))))
# Original solution
#!/usr/bin/env python3

import sys
input=sys.stdin.readline

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

# Optimized solution
n=int(eval(input()))
ans=0
for a in range(1,n+1):
  ans+=(n-1)//a
print(ans)
# Original solution
n = int(eval(input()))
num = 0

for a in range(1, n+1):
  for b in range(1, n//a+1):
    c = n - a * b
    if c != 0:
      num += 1

print(num)

# Optimized solution
n = int(eval(input()))
num = 0

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

print(num)
# Original solution
def main():
    n = int(eval(input()))
    ans = 0
    
    for a in range(1, n):
        for b in range(1, n):
            if a * b > n:
                break
            if 1 <= a * b <= n - 1:
                ans += 1
    print(ans)

        
if __name__ == '__main__':
    main()

# Optimized solution
def main():
    n = int(eval(input()))
    ans = 0
    
    for a in range(1, n):
        for b in range(1, n):
            if 1 <= a * b <= n - 1:
                ans += 1
            else:
                break
           
    print(ans)

        
if __name__ == '__main__':
    main()
# Original solution
n = int(eval(input()))
count = 0
for i in range(1,n+1):
    for j in range(1,n+1):
        if i*j< n:
            count += 1
        else:
            break
print(count)


# Optimized solution
n = int(eval(input()))
count = 0
for i in range(1,n):
    for j in range(1,n):
        if i*j< n:
            count += 1
        else:
            break
print(count)
# Original solution
N = int(eval(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)

# Optimized solution
n = int(eval(input()))
ans = 0
for a in range(1, n):
  ans += (n - 1) // a
print(ans)
# Original solution
k=int(eval(input()))


cnt=0
for i in range(1,k):
    for j in range(1,k+2):
        
            
        if i*j<k:
            cnt+=1
        else:
            break
print(cnt)

# Optimized solution
k=int(eval(input()))


cnt=0
if k>3:
    for i in range(3,k):
        for j in range(1,k):
            
                
            if i*j<k:
                cnt+=1
            else:
                break
print((cnt+k-1+((k-1)//2)))
# Original solution
k=int(eval(input()))


cnt=0
if k>3:
    for i in range(3,k):
        for j in range(1,k):
            
                
            if i*j<k:
                cnt+=1
            else:
                break
print((cnt+k-1+((k-1)//2)))

# Optimized solution
k=int(eval(input()))


cnt=0
if k>6:
    for i in range(7,k):
        for j in range(1,k):
            
                
            if i*j<k:
                cnt+=1
            else:
                break
print((cnt+k-1+((k-1)//2)+((k-1)//3)+((k-1)//4)+((k-1)//5)+((k-1)//6)))
# Original solution
n = int(eval(input()))

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


# Optimized solution
n = int(eval(input()))

count = 0
for a in range(1, n):
    for b in range(1, a+1):
        if a * b <= n - 1:
            if a == b:
                count += 1
            else:
                count += 2
        else:
            break
print(count)
# Original solution
from collections import defaultdict
N=int(eval(input()))

sq_set=set()
for i in range(1,10**3+1):
  sq_set.add(i*i)
#print(sq_set)

alist=[i for i in range(N)]
dlist=[i for i in range(N+1)]
for i in range(2,int(N**0.5)+1):
  if dlist[i]<i:
    continue
  else:
    for j in range(i**2,N+1,i):
      dlist[j]=i  
#print(dlist)

answer=1
for i in range(1,N-1):
  AB=N-i
  AB_copy=AB
  facts=defaultdict(int)
  while AB>1:
    facts[dlist[AB]]+=1
    AB//=dlist[AB]
    
  num_div=1
  for k,v in list(facts.items()):
    num_div*=v+1
    
  #print(AB_copy,facts,num_div)
  answer+=num_div
  
print(answer)

# Optimized solution
N=int(eval(input()))

answer=0
for i in range(1,N):
  answer+=(N-1)//i
print(answer)
# Original solution
from collections import Counter

class Eratosthenes():  # エラトステネスの篩
    def __init__(self, N):  # 素数リスト生成 O(n*log(log n))
        self.fact = [i for i in range(N + 1)]
        for i in range(2, int(N ** 0.5) + 1):
            if self.fact[i] < i:
                continue
            for j in range(i ** 2, N + 1, i):
                self.fact[j] = i
        self.prime = [i for i in range(2, N + 1) if i == self.fact[i]]

    def factor(self, NUM):  # 高速素因数分解 O(log num)
        PRIME = []
        while NUM > 1:
            PRIME.append(self.fact[NUM])
            NUM //= self.fact[NUM]
        return Counter(PRIME)

n = int(eval(input()))

era = Eratosthenes(n)
ans = 0
for i in range(1, n):
    tmp = 1
    for num in list(era.factor(i).values()):
        tmp *= num + 1
    ans += tmp
print(ans)


# Optimized solution
n = int(eval(input()))

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

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


# Optimized solution
n = int(eval(input()))
print((sum((n-1)//a for a in range(1,n))))
# Original solution
N=int(eval(input()))
count = 0
for a in range(1,1000001):
	for b in range(1,1000001):
		if a*b<N:
			count+=1
		else:
			break
print(count)

# Optimized solution
N=int(eval(input()))
count = 0
for a in range(1,1000001):
	count+=(N-1)//a
print(count)
# Original solution
from collections import defaultdict
# d = defaultdict(int)で0で初期化
# d = defaultdict(lambda: 100)で100で初期化
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 solve(a):
    tmp = defaultdict(int)
    while a > 1:
        tmp[sieve[a]] += 1
        a //= sieve[a]
    ans = 1
    for i in list(tmp.values()):
        ans *= (i + 1)
    return ans


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


# Optimized solution
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:
                    # 小さくできるなら小さくするmin_factor[j] != j => i < 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 list(self.fact(n).values()):
            res *= v + 1
        return res

    def sum_divisors(self, n):
        res = 1
        for r, Len in list(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(eval(input()))
ans = 0
p = factorization(n)
for i in range(1, n):
    ans += p.count_divisors(i)
print(ans)
# Original solution
N = int(eval(input()))

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

print(cnt)

# Optimized solution
N = int(eval(input()))

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

print(cnt)
# Original solution
n = int(eval(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)

# Optimized solution
n = int(eval(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)
# Original solution
N = int(eval(input()))
count = 0

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

print(count)

# Optimized solution
N = int(eval(input()))
count = 0

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

print(count)
# Original solution
N = int(eval(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)

# Optimized solution
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()
# Original solution
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(eval(input()))
ans = solve()
print(ans)


# Optimized solution
N = int(eval(input()))
ans = 0
for a in range(1, N):
    ans += (N - 1) // a
print(ans)
# Original solution
n = int(eval(input()))
ans = 0
for a in range(1,n):
    for b in range(1,n):
        if a * b < n:
            ans += 1
        else:
            break
print(ans)

# Optimized solution
n = int(eval(input()))
ans = 0
for a in range(1,n):
    for b in range(1,a+1):
        if a * b < n:
            if a == b:
                ans += 1
            else:
                ans += 2
        else:
            break
print(ans)
# Original solution
N = int(eval(input()))
cnt = 0
for a in range(1,N+1):
  for b in range(1,N+1):
    if a*b >= N:
      break
    cnt+=1
print(cnt)

# Optimized solution
N = int(eval(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)
# Original solution
N = int(eval(input()))
cnt = 0
for a in range(1,N):
  for b in range(1,N):
    #print(a,b,N-a*b)
    if a*b <= N-1: 
      cnt += 1
    else:
      break
      
print(cnt)

# Optimized solution
N = int(eval(input()))
cnt = 0
for a in range(1,N):
  b = (N-1) // a
  cnt += b
      
print(cnt)
# Original solution
N = int(eval(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)


# Optimized solution
N = int(eval(input()))
ans = 0
for a in range(1, N):
    # a * b <= N - 1 となるような b の数 = (N-1)//a
    ans += (N - 1) // a
print(ans)
# Original solution
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(eval(input()))
print((sum(num_divisors_table(n-1))))


# Optimized solution
n=int(eval(input()))
ans=0
for i in range(1,n):
  ans+=(n-1)//i
print(ans)
# Original solution
n = int(eval(input()))
counta=0
tmp=n

for a in range(1,n):
    for b in range(1,n):
        #print(a,b)
        if a * b +1 <= n:
            counta+=1
        else:
            break
print(counta)

# Optimized solution
n = int(eval(input()))
counta=0
for a in range(1,n):
    for b in range(1,n):
        #print(a,b)
        if a * b +1 <= n:
            counta+=1
        else:
            break
print(counta)