qyliang/CodeNanoFix huggingface dataset:
# Buggy code:
while True:
    n, x = map(int, input().split())
    if (n == x == 0):
    break

    count = 0
    for a in range(1, n + 1):
        for b in range(a + 1, n + 1):
            for c in range(b + 1, n + 1):
                Sum = a + b + c
                if (Sum == x):
                    count += 1 
    print(count)

# Fixed code:
while True:
    n, x = map(int, input().split())
    if (n == x == 0):
        break

    count = 0
    for a in range(1, x // 3):
        for b in range(a + 1, x // 2):
            for c in range(b + 1, n + 1):
                Sum = a + b + c
                if (Sum == x):
                    count += 1 
    print(count)
# Buggy code:
while True:
    (n, x) =  [int(i) for i in input().split()]
    if n == x == 0:
        break

    for a in range(1, n+1):
        for b in range(a+1, n+1):
            for c in range(b+1, n+1):
                count = 0
                if (a + b + c) == x:
                    count += 1
                elif (a + b + c) > x:
                    break
    print(count)
~                 

# Fixed code:
while True:
    (n, x) =  [int(i) for i in input().split()]
    if n == x == 0:
        break

    count = 0
    for a in range(1, n+1):
        for b in range(a+1, n+1):
            for c in range(b+1, n+1):
                if (a + b + c) == x:
                    count += 1
    print(count)
# Buggy code:
while True:
    (n,x) = [int(i) for i in input().split()]

    for a in range(1, n + 1 - 2):
        for b in range(a + 1, n + 1 - 1):
            for c in range(b + 1,n + 1):
                if (a + b + c) == x:
                    count += 1
    print(count) 

# Fixed code:
while True:
    (n,x) = [int(i) for i in input().split()]
    if n == x == 0:
        break
    
    count = 0
    for a in range(1, n + 1 - 2):
        for b in range(a + 1, n + 1 - 1):
            for c in range(b + 1,n + 1):
                if (a + b + c) == x:
                    count += 1
    print(count)
# Buggy code:
# -*- coding: utf-8 -*-
a = int(input())
xy = [map(int, input().split()) for _ in range(a)]
x, y = [list(i) for i in zip(*xy)]
flag = 0
for i in range(a):
    if (x[i] == y[i]):
      flag = flag+1
    else:
      flag = 0
if flag >= 3:
    print("Yes")
else:
  print("No")



# Fixed code:
# -*- coding: utf-8 -*-
a = int(input())
xy = [map(int, input().split()) for _ in range(a)]
x, y = [list(i) for i in zip(*xy)]
flag = 0
b=0
for i in range(a):
    if (x[i] == y[i]):
      flag = flag+1
      if (flag ==3):
        b = 1
    else:
      flag = 0
    
if b==1:
    print("Yes")
else:
  print("No")
# Buggy code:
N = int(input())
cnt = 0
ans = False
for i in range(N):
    a, b = input().split()
    print(a, b)
    if a == b:
        cnt += 1
    else:
        cnt = 0
    if cnt == 3:
        ans True
        break
    print(cnt)
print('Yes' if ans else 'No')



# Fixed code:
N = int(input())
cnt = 0
ans = False
for i in range(N):
    a, b = input().split()
    if a == b:
        cnt += 1
    else:
        cnt = 0
    if cnt == 3:
        ans = True
        break
print('Yes' if ans else 'No')
# Buggy code:
n = int(input())
ans = "No"
count = 0
for i in range(n):
    D1,D2 = map(int,input().split())
    count+=1 if D1==D2 else 0
    ans="Yes"  if D1 >= 3 else ans

print(ans)

# Fixed code:
n = int(input())
ans = "No"
count = 0
for i in range(n):
    D1,D2 = map(int,input().split())
    count=count+1 if D1==D2 else 0
    ans="Yes"  if count>=3 else ans

print(ans)
# Buggy code:
n = int(input())

ans = 'No'
count = 0
for i in range(n):
  a,b = map(int,input().split())
  if a==b:
    count += 1
    if count == 3:
      ans = 'Yes'

print(ans)      
      
      
  

# Fixed code:
n = int(input())
 
ans = 'No'
count = 0
for i in range(n):
  a,b = map(int,input().split())
  if a==b:
    count += 1
    if count == 3:
      ans = 'Yes'
  else:
    count = 0
    
print(ans)
# Buggy code:
n=int(input())
c=1
for i in range(n):
    a,b=map(int,input().split())
    if a==b:
        count+=1
    else:
        count=0
    if count==3:
        c=1
if c==1:
    print("Yes")
else:
    print("No")


    

# Fixed code:
n = int(input())
c = 0
for i in range(n):
  a, b = map(int, input().split())
  if a==b:
    c+=1
  else:
    c=0
  if c == 3:
    print('Yes')
    exit()
print('No')
# Buggy code:
num = int(input())
ans = 0
cnt = 0
for x in range(num):
    d1, d2 = map(int, input().split())
    if d1 == d2: cnt += 1
    else: 
        ans = max(cnt, 2)
        cnt = 0
ans = max(cnt, 2)
if ans >= 3: print("Yes")
else:  print("No")

# Fixed code:
num = int(input())
ans = 0
cnt = 0
for x in range(num):
    d1, d2 = map(int, input().split())
    if d1 == d2: cnt += 1
    else: 
        ans = max(cnt, ans)
        cnt = 0
ans = max(cnt, ans)
if ans >= 3: print("Yes")
else:  print("No")
# Buggy code:
N = int(input())
D = []
count = 0

for n in range(N):
    input_line = input().split()
    if (int(input_line[0]) == int(input_line[1])):
        count += 1
        if count == 3:
            temp = 1
    elif(temp ==1):
        break
    else:
        count = 0

if count >= 3:
        print('Yes')

else:
        print('No')

# Fixed code:
N = int(input())
D = []
count, temp = 0, 0

for n in range(N):
    input_line = input().split()
    if (int(input_line[0]) == int(input_line[1])):
        count += 1
        if count == 3:
            temp = 1
    elif(temp ==1):
        break
    else:
        count = 0

if count >= 3:
        print('Yes')

else:
        print('No')
# Buggy code:
c = int(input())
count = 0

d = [list(map(int,input().split())) for i in range(c)]
for i in range(c):
    a,b = d[i][0],d[i][1]
    
    if (a==b):
        count += 1
    else : 
        count = 0

if (count >= 3):
        
    print("Yes")
else :
    print("No")


# Fixed code:
c = int(input())
count = 0

d = [list(map(int,input().split())) for i in range(c)]
for i in range(c):
    a,b = d[i][0],d[i][1]
    
    if (a==b):
        count += 1
        if ( count == 3):
            break
    else : 
        count = 0

if (count >= 3):
        
    print("Yes")
else :
    print("No")
# Buggy code:
N = int(input())
Di1 = []
Di2 = []
nmDi = 0
if N >= 3 and N <= 100:
   for x in range(N):
      Di1.append(int(input()))
      Di2.append(int(input()))
for x in range(N):
   if Di1[x] == Di2[x]:
      nmDi += 1
      if nmDi == 3:
         break
   elif Di1[x] != Di2[x] and nmDi > 0:
      nmDi = 0
if nmDi >= 3:
   print("Yes")
else:
   print("No")

# Fixed code:
N = int(input())
Di = 0
Di1 = []
Di2 = []
nmDi = 0
if N >= 3 and N <= 100:
   for x in range(N):
      Di = input()
      Di1.append(Di[0])
      Di2.append(Di[-1])
   for x in range(N):
      if Di1[x] == Di2[x]:
         nmDi += 1
         if nmDi == 3:
            break
      elif Di1[x] != Di2[x] and nmDi > 0:
         nmDi = 0
   if nmDi >= 3:
      print("Yes")
   else:
      print("No")
else:
   print ("No")
# Buggy code:
def main():
    N = int(input())
    z = 0
    for i in range(N):
        d1, d2 = map(int, input().split())
        if d1 == d2:
            z += 1
        else:
            z = 0
        if z >= 3:
            return True

    return False

# print("Yes" if main() else "No")
print(main())


# Fixed code:
def main():
    N = int(input())
    z = 0
    for i in range(N):
        d1, d2 = map(int, input().split())
        if d1 == d2:
            z += 1
        else:
            z = 0
        if z >= 3:
            return True

    return False

print("Yes" if main() else "No")
# Buggy code:
n = int( input() )
#print( n )

cnt = 0
for i in range( n ):
    a, b = map( int, input().split() )
    if a == b:
        cnt = cnt + 1
    else:
        cnt = 0

    if cnt == 3:
        exit( "Yes" )


print( "No" )


# Fixed code:
n = int( input() )
#print( n )

cnt = 0
ans = "No"
for i in range( n ):
    a, b = map( int, input().split() )
    if a == b:
        cnt = cnt + 1
    else:
        cnt = 0

    if cnt == 3:
        ans = "Yes"


print( ans )
# Buggy code:
n = int(input())
t = []
i = 0
for _ in range(n):
    x, y = map(int, input().split())
    if x == y:
        i += 1
    else:
        i = 0
    t.append(i)
if(len(filter(lambda x: x >= 3, t)) == 0):
    print("No")
else:
    print("Yes")


# Fixed code:
n = int(input())
t = []
i = 0
for _ in range(n):
    x, y = map(int, input().split())
    if x == y:
        i += 1
    else:
        i = 0
    t.append(i)
if(len(list(filter(lambda x: x >= 3, t))) == 0):
    print("No")
else:
    print("Yes")
# Buggy code:
n=int(input())
s=0
for i in range(n):
  lis=input().split()
  if lis[0]==lis[1]:
    s+=1
  else:
    s=0
if s>=3:
  print("Yes")
else:
  print("No")

# Fixed code:
n=int(input())
s=0
ok=0
for i in range(n):
  lis=input().split()
  if lis[0]==lis[1]:
    s+=1
    if s>=3:
      ok=1
  else:
    s=0
if ok==1:
  print("Yes")
else:
  print("No")
# Buggy code:
def solve():
  N = int(input())
  lines = [input().split() for i in range(N)]
  for d,e in lines:
    if d==e:
      count += 1
      if count>=3:
        print("Yes")
        return
    else:
      count = 0
  print("No")
  return

solve()

# Fixed code:
def solve():
  N = int(input())
  lines = [input().split() for i in range(N)]
  count = 0
  for d,e in lines:
    if d==e:
      count += 1
      if count>=3:
        print("Yes")
        return
    else:
      count = 0
  print("No")
  return

solve()
# Buggy code:
n=int(input())
ans=0
D=[]
for i in range(n):
  a,b=map(int, input().split())
  D.append(a)
  D.append(b)


for i in range(len(D)-1):
  if D[i]==D[i+1]:
    ans +=1

if ans>=3:
  print("Yes")
  
else:
  print("No")

# Fixed code:
n=int(input())
ans=0
D=[]
A=[]
for i in range(n):
  a,b=map(int, input().split())
  D.append([a,b])


for i in range(len(D)):
  if D[i][0]==D[i][1]:
    ans +=1
  else:
    if ans>0:
      ans = 0
  A.append(ans)
  
if max(A) >= 3:
  print("Yes")
  
else:
  print("No")
# Buggy code:
n = int(input())
num_of_double = 0

for i in range(n):
    d1, d2 = map(int,input().split())

    if d1 == d2:
        num_of_double += 1

if num_of_double >= 3:
    print("Yes")
else:
    print("No")

# Fixed code:
n=int(input())
cnt=0
ans="No"
for i in range(n):
    d1,d2=map(int,input().split())
    if d1==d2:
        cnt+=1
    else:
        cnt=0
    if cnt>=3:
        ans="Yes"
print(ans)
# Buggy code:
cnt = 0
for _ in range(n):
  a, b = map(int, input().split())
  if a == b:
    cnt += 1
  else:
    cnt = 0
  
  if cnt == 3:
    print("Yes")
    exit()

print("No")

# Fixed code:
n = int(input())
cnt = 0
for _ in range(n):
    a,b = map(int,input().split())
    if(a==b):
        cnt += 1
    else:
        cnt = 0
    if(cnt==3):
        print('Yes')
        exit()
print('No')
# Buggy code:
N = int(input())
D = [list(map(int, input().split())) for _ in range(N)]
 
for i in range(N-2):
  if D[i][0] == D[i][1] and D[i+1][0] == D[i+1][1] and D[i+2][0] == D[i+2][1]:
    print('Yes')
    break
    
print('No')

# Fixed code:
N=int(input())
D = [list(map(int, input().split())) for _ in range(N)]
ans = 0
for i in range(N-2):
    if D[i][0] == D[i][1]:
        if D[i+1][0] == D[i+1][1]:
            if D[i+2][0] == D[i+2][1]:
                ans = 1
                break
if ans:
    print("Yes")
else:
    print("No")
# Buggy code:
cnt = 0
n = int(input())
for i in range(0,n):
    d1, d2 = map(int, input().split())
    if d1 == d2:
        cnt += 1
        if cnt == 3 :
            print("Yes")
            break
    else:
        cnt == 0
        
    if cnt != 3 and i == n-1:
        print("No")

# Fixed code:
cnt = 0
n = int(input())
for i in range(0,n):
    d1, d2 = map(int, input().split())
    if d1 == d2:
        cnt += 1
        if cnt == 3 :
            print("Yes")
            break
    elif  cnt >= 0 and d1 != d2:
        cnt = 0 
    if i == n-1:
        print("No")
# Buggy code:
N = int(input())
count = 0
for i in range(N):
    a, b = map(int, input().split())
    if a == b:
        count += 1
if count >= 3:
    print("Yes")
else:
    print("No")


# Fixed code:
N = int(input())
count = 0
for i in range(N):
    a, b = map(int, input().split())
    if a == b:
        count += 1
    else:
        count = 0
    if count == 3:
        break
if count >= 3:
    print("Yes")
else:
    print("No")
# Buggy code:
input = stdin.readline

N = int(input())

b = False
cnt = 0
for i in range(N):
    D1, D2 = map(int, input().split())
    if D1 == D2:
        cnt += 1
        if cnt == 3:
            b = True
    else:
        cnt = 0

if b == False:
    print('No')
else:
    print('Yes')

# Fixed code:
from sys import stdin
input = stdin.readline

N = int(input())

b = False
cnt = 0
for i in range(N):
    D1, D2 = map(int, input().split())
    if D1 == D2:
        cnt += 1
        if cnt == 3:
            b = True
    else:
        cnt = 0

if b == True:
    print('Yes')
else:
    print('No')
# Buggy code:
N = int(input())
t = 0
for i in range(N):
    a, b = [int(x) for x in input().split()]
    if a != b:
        t = 0
    else:
        t += 1
    if t == 2:
        break
if t == 3:
    print("Yes")
else:
    print("No")


# Fixed code:
N = int(input())
t = 0
for i in range(N):
    a, b = [int(x) for x in input().split()]
    if a != b:
        t = 0
    else:
        t += 1
    if t > 2:
        break
if t > 2:
    print("Yes")
else:
    print("No")
# Buggy code:
n = int(input())
cur = 0
best = 0
for _ in range(n):
  	a, b = input().split()
    if a == b:
        cur += 1
        best = max(best, cur)
    else:
      	cur = 0
if best >= 3:
  	print("Yes")
else:
  	print("No")

# Fixed code:
n = int(input())
cur = 0
best = 0
for _ in range(n):
        a, b = input().split()
        if a == b:
                cur += 1
                best = max(best, cur)
        else:
                cur = 0
if best >= 3:
        print("Yes")
else:
        print("No")
# Buggy code:
# coding:utf-8
n = int(input())
count = 0

for i in range(n):
    d1, d2 = map(int, input().split())

    if d1 == d2:
        count += 1

    if count >= 3:
        print('Yes')
        exit()

print('No')


# Fixed code:
# coding:utf-8
n = int(input())
count = 0

for i in range(n):
    d1, d2 = map(int, input().split())

    if d1 == d2:
        count += 1
    else:
        count = 0

    if count == 3:
        print('Yes')
        exit()


print('No')
# Buggy code:
def run(n, _in_list):
    '''
    '''
    is_doublet_count = 0
    for x in _in_list:
        _in = list(x)
        if _in[0] ==_in[1]:
            is_doublet_count += 1
        else:
            is_doublet_count = 0
    
    print('Yes' if is_doublet_count >= 3 else 'No')
    




if __name__ == '__main__':
    n = int(input())
    _in_list = [map(int, input().split()) for _ in range(n)]
    run(n, _in_list)

# Fixed code:
def run(n, _in_list):
    '''
    '''
    is_doublet_count = 0
    for x in _in_list:
        if is_doublet_count == 3:
            break
        _in = list(x)
        if _in[0] ==_in[1]:
            is_doublet_count += 1
        else:
            is_doublet_count = 0
    
    print('Yes' if is_doublet_count >= 3 else 'No')
    




if __name__ == '__main__':
    n = int(input())
    _in_list = [map(int, input().split()) for _ in range(n)]
    run(n, _in_list)
# Buggy code:
n = int(input())

number = 0
for i in range(n):
  a, b = map(int, input().split())
  if a == b:
    number += 1
  else:
    number = 0
  if number == 3:
    print("Yes")

print("No")

# Fixed code:
n = int(input())

answer = "No"
number = 0
for i in range(n):
  a, b = map(int, input().split())
  if a == b:
    number += 1
  else:
    number = 0
  if number == 3:
    answer = "Yes"

print(answer)
# Buggy code:
n = int(input())
cnt = 0
for i in range(n):
  d1, d2 = map(int, input().split())
  if d1 == d2:
    cnt += 1
if cnt >= 3:
  print('Yes')
else:
  print('No')

# Fixed code:
n = int(input())
cnt = 0
for i in range(n):
  d1, d2 = map(int, input().split())
  if d1 == d2:
    cnt += 1
    if cnt == 3:
      break
  else:
    cnt = 0
if cnt >= 3:
  print('Yes')
else:
  print('No')
# Buggy code:
import math

from fractions import Fraction as frac

MOD = 1e9 + 7

def gcd(a, b):

    if b == 0:

        return a

    return gcd(b, a % b)

def lcm(a, b):

    return a * b // gcd(a, b)

def solve(case_no):

    n = int(input())

    cnt=0

    for i in range(n):

    	a,b = map(int,input().split())    	if a==b:

        cnt += 1

        if cnt == 3:

    		print("Yes")

    		exit()

    	else:

    		cnt=0

    print("No")

t = 1

# t = int(input())

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

    solve(i)

# Fixed code:
import math
from fractions import Fraction as frac

MOD = 1e9 + 7

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

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

def solve(case_no):
    n = int(input())
    cnt=0
    for i in range(n):
    	a,b = map(int,input().split())
    	if a==b:
    		cnt += 1
    		if cnt == 3:
    			print("Yes")
    			exit()
    	else:
    		cnt=0
    print("No")
    	

t = 1
# t = int(input())
for i in range(1, t + 1):
    solve(i)
# Buggy code:
N=int(input())
p=False
s=0
for i in range(N):
  a,b=map(int,input().split())
  if a==b:
    s+=1
    if s==3:
      break
  else:
    s=0
print("Yes" if p else "No")

# Fixed code:
N=int(input())
p=False
s=0
for i in range(N):
  a,b=map(int,input().split())
  if a==b:
    s+=1
    if s==3:
      p=True
      break
  else:
    s=0
print("Yes" if p else "No")
# Buggy code:
ans = 0
for i in range(int(input())):
  a,b = map(int,input().split())
  if a==b:
    ans += 1
if ans>=3:
  print('Yes')
else:
  print('No')

# Fixed code:
n=int(input()) 
cnt=0
ans=0

for i in range(n):
    a,b=map(int, input().split())
    if a==b:
        cnt+=1
        if ans < cnt:
            ans = cnt
    else:
        cnt=0

if ans >=3:
    print('Yes')
else:
    print('No')
# Buggy code:
from math import sqrt

# Function to return count of Ordered pairs
# whose product are less than N
def countOrderedPairs(N):
    # Initialize count to 0
    count_pairs = int(0)

    # count total pairs
    p = int(sqrt(N - 1))  # + 1
    q = N
    # q = int(sqrt(N)) + 2
    for i in range(1, p, 1):
        for j in range(i, q, 1):
            if i * j > N:
                break
            # print(i,j)
            count_pairs += 1
    #print(count_pairs)
    # multiply by 2 to get ordered_pairs
    count_pairs *= 2

    #print(count_pairs)
    # subtract redundant pairs (a, b) where a==b.
    count_pairs -= int(sqrt(N - 1))

    # return answer
    return count_pairs

    # Driver code

N = int(input())
print(countOrderedPairs(N))
# ans=prime_factorize(N)
# print(ans)


# Fixed code:
from math import sqrt

# Function to return count of Ordered pairs
# whose product are less than N
def countOrderedPairs(N):
    # Initialize count to 0
    count_pairs = int(0)

    # count total pairs
    p = int(sqrt(N - 1)) + 1
    q = N
    # q = int(sqrt(N)) + 2
    for i in range(1, p, 1):
        for j in range(i, q, 1):
            if i * j > N-1:
                break
            # print(i,j)
            count_pairs += 1
    #print(count_pairs)
    # multiply by 2 to get ordered_pairs
    count_pairs *= 2

    #print(count_pairs)
    # subtract redundant pairs (a, b) where a==b.
    count_pairs -= int(sqrt(N - 1))

    # return answer
    return count_pairs

    # Driver code

N = int(input())
print(countOrderedPairs(N))
# ans=prime_factorize(N)
# print(ans)
# Buggy code:
N = int(input())

ans = 0

for a in range(1, N):
    cnt = 0
    for b in range(1, N):
        if a * b < N:
            if a < b:
                cnt += 2
            elif a == b:
                cnt += 1
        else:
            break
    
    ans += cnt

print (ans)

# Fixed code:
import math

N = int(input())

ans = 0

for a in range(1, N):
    cnt = 0
    for b in range(a, N):
        if a * b < N:
            if a < b:
                cnt += 2
            elif a == b:
                cnt += 1
        else:
            break
    ans += cnt

print (ans)
# Buggy code:
n = int(input())
ans = 0
for i in range(1,n-1):
  ans+= (n-1)//i
print(ans);
  

# Fixed code:
n = int(input())
ans = 0
for i in range(1,n):
    ans += (n-1)//i
        
print(ans)
# Buggy code:
import math
n=int(input())
s=0

r=0
t=n//2
for i in range(1,t+1):
    p=((n-1)//i)



    s+=p

print(s+t-1)

# Fixed code:
import math
n=int(input())
s=0

r=0
t=n
for i in range(1,n):
    p=((n-1)//i)



    s+=p

print(s)
# Buggy code:
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
    for i in range(1,n+1):
        rick+=(n-1)/i
    print(rick)
        


    
        


        


    




















if __name__ == "__main__":
    main()

# Fixed code:
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()
# Buggy code:
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-1/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-1/i)-1
        else:
            count += int(N-1/i)

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

# Fixed code:
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)
# Buggy code:
#!/usr/bin/env python3
import sys


def solve(N: int):
    n = 0
    for c in range(1, N):
        a = 1
        # print("c",c)
        while a*a < N-c:
            # print("a",a)
            if (N-c) % a == 0:
                n += 2
            a += 1
        if a*a == N-c:
            n += 1
    print(n)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()


# Fixed code:
#!/usr/bin/env python3
import sys


def solve(N: int):
    n = 0
    for c in range(1, N):
        if N % c == 0:
            n += N // c - 1
        else:
            n += N // c
    print(n)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()
# Buggy code:
n = int(input())
ans = 0
for a in range(1, n):
  ans += (n - 1)
print(ans)

# Fixed code:
n=int(input())
ans=0
for a in range(1,n+1):
  ans+=(n-1)//a
print(ans)
# Buggy code:
n=int(input())
ans=0
for a in range(1,n):
    ans+=n//a
print(ans)

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