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


cnt = 0
for a in range(1, n + 1):
    b = 1
    while a * b < n:
        cnt += 1
        b += 1

print(cnt)

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):
import sys
MAX_INT = int(10e12)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

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

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

Solution (Python):
FAST_IO = 0
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()

    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())
rrmm = lambda n: [rrm() for _ in xrange(n)]


MOD = 10**9 + 7
YES, NO, IMP = "YES", "NO", "IMPOSSIBLE"
from collections import defaultdict as ddic

def solve(N):
    
    
    ds = [2] * (N + 1)
    ds[0] = ds[1] = 1
    for i in xrange(2, N + 1):
        for j in xrange(2*i, N + 1, i):
            ds[j] += 1

    return sum(ds[i] for i in xrange(1, N))
    
N = rri()
print solve(N)

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

Solution (Python):

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


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



if __name__ == '__main__':
    main()

Solution (Python):
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 a in range(1,n):
    
    b = n // a
    if a*b == n:
        b-=1
    
    count+=b

print(count)

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

ans = 0

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

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

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

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

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

def kouho_num(a):
    if n%a==0:
        return n//a-1
    else:
        return n//a
ans=0

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

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

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

import sys


def solve(N: int):
    ans = 0
    for a in range(1, N):
        bb = N // a
        cc = N % a
        ans += bb - (1 if cc == 0 else 0)
    return ans



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    print(solve(N))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    
    main()

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

    class osa_k:
        def __init__(self, sup):
            if sup > 2 * 10**8:
                raise RuntimeError(
                )
            self.MINFact = [-1] * (sup + 1)
            self.MINFact[0] = 0
            self.MINFact[1] = 1
            primes = [True for i in range(sup+1)]
            primes[0] = False
            primes[1] = False
            for i in range(2, sup+1):
                if primes[i]:
                    self.MINFact[i] = i
                    mul = 2
                    while i*mul <= sup:
                        primes[i*mul] = False
                        if self.MINFact[i*mul] == -1:
                            self.MINFact[i*mul] = i
                        mul += 1

        def prime_factor(self, n):
            res = 1
            while n > 1:
                prime = self.MINFact[n]
                exp = 0
                while self.MINFact[n] == prime:
                    n //= prime
                    exp += 1
                res *= (exp + 1)
            return res

    ok = osa_k(N+1)

    ans = 0
    for c in range(1, N):
        M = N - c
        ans += ok.prime_factor(M)
    print(ans)


if __name__ == '__main__':
    main()

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


def ceil(a, b):
    return -(-a // b)


ans = 0

for a in range(1, n):
    for b in range(1, ceil(n, a)):
        if n-a*b > 0:
            ans += 1
print(ans)

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

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

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

print(ans)

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

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

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

print(res)

Solution (Python):

n=int(input())

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

Solution (Python):

def resolve():
    n = int(input())
    cnt = 0
    for a in range(1, n+1):
        b = n // a
        c = n % a
        cnt += b
        if c == 0:
            cnt -= 1

    print(cnt)

if __name__ == "__main__":
    resolve()

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+1):
    if(N%i==0):
        ans+=N//i-1
    else:
        ans += N//i
print(ans)

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

import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from fractions import Fraction
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations, accumulate
from operator import add, mul, sub, itemgetter, attrgetter


import sys


readline = sys.stdin.readline

INF = 1 << 60


def read_int():
    return int(readline())


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


def read_float():
    return float(readline())


def read_float_n():
    return list(map(float, readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()


def ep(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.perf_counter()
        ret = f(*args, **kwargs)
        e = time.perf_counter()

        ep(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    ans = 0
    for a in range(1, N+1):
        for b in range(1, N//a + 1):
            c = N - a*b
            if c > 0:
                ans += 1

    return ans


def main():
    N = read_int()
    print(slv(N))


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines



N = int(read())
A = np.arange(1, N + 1)
B = (N - 1) // A
print(B.sum())

Solution (Python):

import sys
sys.setrecursionlimit(10**6)

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):
import sys
sys.setrecursionlimit(10 ** 9)

def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')







def solve():
    N = II()

    ans = 0
    for a in range(1, 1000005):
        for b in range(1, 1000005):
            if a * b > 1000_000:
                break
            c = N - (a * b)
            if c > 0:
                ans += 1
    print(ans)

if __name__ == '__main__':
    solve()

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

ans=0

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


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):
n=int(input())
k=0
for i in range(1,n):
    for j in range(1,n//i+(n%i!=0)):
        if n!=i*j:
            k+=1
print(k)

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

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

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):
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
input = sys.stdin.readline
INF = float("inf")



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


if __name__ == '__main__':
    main()

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

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

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

print(sum(num_divisors_table(n-1)))

Solution (Python):
N = int(input())
n = N-1
ans = 0

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

Solution (Python):









from collections import defaultdict

n = int(input())
N = n + 10  
lp = [0] * (N+1)
pr = []  
for i in range(2, N+1):
    if lp[i] == 0:
        lp[i] = i
        pr.append(i)
    for j, p in enumerate(pr):
        if p > lp[i] or i * p > N:
            break
        lp[i * p] = p


def fac_small(n):
    """
    引数 n の素因数分解をして、素因数を昇順に格納したリストを返す。
    ex. fac_small(60) == [2, 2, 3, 5]
    与えられた n について 1 <= n <= N を仮定する。n == 1 では空リストを返す。
    計算量は O(log n) 
    """
    
    ret = defaultdict(int)
    while n > 1:
        ret[lp[n]] += 1
        n //= lp[n]
    return ret


ans = 0
for c in range(1, n):
    tmp = 1
    for f in (fac_small(n - c)).values():
        tmp *= (f + 1)
    ans += tmp

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

Solution (Python):
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]

def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()
  ans=0
  for a in range(1,n):
    if n%a==0:
      _n=n-1
    else:
      _n=n

    ans+=_n//a

  return ans


print(main())

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

def solve():
    n=int(input())
    count=0
    for i in range(1,n):
        for j in range(1,n):
            if n - i*j>0:
                count+=1
            else:
                break
    print(count)

if __name__=="__main__":
    solve()

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 i in range(1,n):
    for j in range(i,n):
        c=n-i*j
        if c<=0:
            break
        else:
            cnt+=1+(i!=j)
print(cnt)

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



from collections import Counter
M = 10**6 + 4
prime = [0]*M
for i in range(2, M):
    if prime[i]:
        continue
    for j in range(i, M, i):
        if not prime[j]:
            prime[j] = i

def pd(x):
    C = Counter()
    while x > 1:
        C[prime[x]] += 1
        x //= prime[x]
    return C

N = int(readline())

ans = 0
for i in range(1, N):
    c = pd(i)
    res = 1
    for vi in c.values():
        res *= (1+vi)
    ans += res
print(ans)

Solution (Python):
from collections import Counter
import sys
import math
from functools import cmp_to_key

sys.setrecursionlimit(10 ** 6)

mod = 1000000007
inf = int(1e18)


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

main()

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

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

N=int(readline())


def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
  
ans = 0
for i in range(1, N):
  for j in range(i, N, i):
    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())

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())
MAX = pow(10,6) + 10
ans = 0
for a in range(1,MAX):
  kosu = N//a
  if N%a == 0:
    kosu -=1
  ans += kosu
print(ans)

Solution (Python):
import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict






def solve(k):  
    console("----- solving ------")

    dp = [0 for _ in range(k+1)]

    for i in range(1,k+1):
        for j in range(i,k+1,i):
            dp[j] += 1
    
    return sum(dp[:-1])


def console(*args):  
    print('\033[36m', *args, '\033[0m', file=sys.stderr)
    return




for case_num in [1]:
    
    

    
    k = int(input())
    
    
    

    
    

    
    
    
    
    
    

    res = solve(k)  
    
    
    

    
    print(res)

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

Solution (Python):
import sys, math
import io, os

from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter

def data(): return sys.stdin.readline().strip()
def mdata(): return list(map(int, data().split()))
def outl(var): sys.stdout.write(' '.join(map(str, var)) + '\n')
def out(var): sys.stdout.write(str(var) + '\n')
from decimal import Decimal


mod = int(1e9) + 7
INF=float('inf')

n=int(data())
ans=0
for i in range(1,n):
    ans+=n//i
    if n%i==0:
        ans-=1
out(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):
ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
ips = lambda:input().split()
import collections
import math
import itertools
import heapq as hq
n = ni()
ans = 0
for a in range(1,n):
    ans += (n-1)//a
print(ans)

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

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

import time
import math
from heapq import heappop, heappush
from collections import defaultdict
from collections import Counter
from collections import deque
from itertools import permutations
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


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())
count = 0
for i in range(1, n+1):
    for j in range(i+1, n+1):
        if i*j < n:
            count += 2
        else:
            break
for i in range(1, n+1):
    if i**2 < n:
        count += 1
    else:
        break
print(count)

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

result = 0
for A in range(1, N + 1):
    for B in range(1, (N // A) + 1):
        C = N - A * B
        if C == 0:
            continue
        result += 1
print(result)

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

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):
from typing import List, Any


def read_int() -> int:
    return int(input().strip())


def read_ints() -> List[int]:
    return list(map(int, input().strip().split(' ')))


def solve() -> Any:
    N = read_int()
    answer = 0
    for A in range(1, N):
        count = N//A
        if N%A == 0:
            count -= 1
        answer += count
    return answer


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

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

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

res = 0

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

print(res)

Solution (Python):
N = int(input())
cnt = 0
for A in range(1,N):
    for B in range(1,(N-1)//A+1):
        if A*B<=N-1:
            cnt+=1
print(cnt)

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

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

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

print(res)

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from math import gcd
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, gcd
from operator import mul
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = 10 ** 13
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().rstrip().split()
def S(): return sys.stdin.readline().rstrip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]

mod=10**9+7
n=I()
ans=0
for i in range(1,n+1):
    ans+=(n-1)//i

print(ans)

Solution (Python):
n = int(input())
max_ = 10 ** 6 + 10
ans = [2 for _ in range(max_)]
ans[0] = 0
ans[1] = 1
for i in range(2, max_):
    for j in range(i * i, max_, i):
        ans[j] += 2
        if j == i * i:
            ans[j] -= 1

ans_ = 0
for i in range(1, n):
    ans_ += ans[i]
print(ans_)

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()
ans = 0

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

print(ans)

Solution (Python):
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

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


def get_nums_l():
    return [ int(s) for s in input().split(" ")]


def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

def main():
    INF = 999999999999999999999999
    MOD = 10**9+7

    n = int(input())
    ans = 0

    for a in range(1, n):
        b = 1
        while a*b < n:
            ans += 1
            b += 1
    
    print(ans)

main()

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

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

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

    print(ans)
    return


if __name__ == '__main__':
    main()

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

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

print(ans)

Solution (Python):
N, = [int(x) for x in input().split()]

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

print(ans)

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

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

Solution (Python):

import sys
input = sys.stdin.readline

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

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

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

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache





MOD = 10**9+7
INF = float('inf')
AZ = "abcdefghijklmnopqrstuvwxyz"






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]



def DD(arg): return defaultdict(arg)


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n): return kaijo_memo[n]
  if(len(kaijo_memo) == 0): kaijo_memo.append(1)
  while(len(kaijo_memo) <= n): kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n): return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0): gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n): gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if n == r: return 1
  if n < r or r < 0: return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


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)
  return divisors


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


def gcd(a, b):
    while b: a, b = b, a % b
    return a


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


def count_bit(n):
  count = 0
  while n:
    n &= n-1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n: return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

def base_10_to_n_without_0(X, n):
  X -= 1
  if X//n: return base_10_to_n_without_0(X//n, n)+[X%n]
  return [X%n]


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count





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

Solution (Python):

import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter

from functools import lru_cache
import copy


input = sys.stdin.readline
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7




def inp():
    '''
    一つの整数
    '''
    return int(input())


def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))


def str_inp():
    '''
    文字列をリストとして読み込む
    '''
    return list(input()[:-1])




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

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

Solution (Python):


import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

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

if __name__ == "__main__":
    main()

Solution (Python):
from math import floor


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

Solution (Python):


from collections import defaultdict
mod = 10 ** 9 + 7; INF = float("inf")

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

def inverse(N, mod):
	return (pow(N, mod - 2, mod))

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

	print(ans)

	




if __name__ == '__main__':
	main()

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

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