qyliang/CodeNanoFix huggingface dataset:
# Buggy code:
import sys
n = int(sys.stdin.readline().strip())

# A * B + C, make sure A * B <= N, if A == B, it is (N-A*B) + 1, else ((N-A*B) + 1) * 2
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)
"""

# A==B, from 1 to square root
res += int(n**0.5)
if int(n**0.5) ** 2 == n:
    res -= 1
# Assuming A < B
# A = 1, B=2...(N-1)/1
# A = 2, B=3...(N-1)/2
for i in range(1, int(n**0.5)):
    half = (n-1) // i - i
    res += half * 2
print(res)

# Fixed code:
import sys
n = int(sys.stdin.readline().strip())

# A * B + C, make sure A * B <= N, if A == B, it is (N-A*B) + 1, else ((N-A*B) + 1) * 2
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)
"""

# A==B, from 1 to square root
res += int(n**0.5)
upperbound = int(n**0.5) + 1
if int(n**0.5) ** 2 == n:
    # n has int square root
    res -= 1
    upperbound = int(n**0.5)

# Assuming A < B
# A = 1, B=2...N-1
# A = 2, B=3...N/2 or N/2-1

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

# Fixed code:
s=0
n=int(input())-1
for i in range(n):s+=n//(i+1)
print(s)
# Buggy code:
n=int(input())
x=0
for i in range(n):
    if i==0:
        continue
    else:
        for j in range(n-i+1):
            if j==0:
                continue
            else:
                if (n-i) / j == (n-i) // j:
                    x+=1
                    
print(x)

# Fixed code:
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)
# Buggy code:
N = int(input())
L=[0]*N

for i in range (1,N):
  L[i]=round((N-1)/i)
  #print(i)

#print(L)
ans = sum(L)
print(ans)

# Fixed code:
N = int(input())
L=[0]*N

for i in range (1,N):
  L[i]=(N-1)//i
  #print(i)

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

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

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


# Fixed code:
N  =int(input())
c = 0
for i in range(N):
  c += (N-1)//(i+1)
print(c)
# Buggy code:
N = int(input())
count = 0

for a in range(1, N+1):
  tmp = (N-1) // a
  if a == tmp:
    count += 1
  if a < N // 2:
    count += tmp
  else:
    count += 1          

print(count-1)

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

for a in range(1, N):
  tmp = (N-1) // a
  if a <= (N) // 2:
    count += tmp
  else:
    count += 1          

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

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

#!/usr/bin/env python
from typing import List


def input_int() -> int:
    return int(input())


def input_list_int() -> List[int]:
    return list(map(lambda x: int(x), input().split()))


def f(n: int) -> int:
    ans = 0
    for a in range(1, n - 1):
        ans += (n - 1) // a
    return ans


if __name__ == '__main__':
    n = input_int()
    print(f(n))

# Fixed code:
#!/usr/bin/env python
from typing import List


def input_int() -> int:
    return int(input())


def input_list_int() -> List[int]:
    return list(map(lambda x: int(x), input().split()))


def f(n: int) -> int:
    ans = 0
    for a in range(1, n):
        ans += (n - 1) // a
    return ans


if __name__ == '__main__':
    n = input_int()
    print(f(n))
# Buggy code:
def readInt():
    return int(input())
def readList():
    return list(map(int,input().split()))
def readMap():
	return map(int,input().split())
def readStr():
    return input()
inf=float('inf')
mod = 10**9+7
import math
from itertools import permutations
def solve(N):
    count=0
    for i in range(1,N):
        count+=(N-1)//i
    return count

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

for i in range(1,101):
    print(solve(i))

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

N=readInt()
print(solve(N))
# Buggy code:
n=int(input())
count=0
for i in range(1,int(n**(1/2))):
    for j in range(i,n):
        if i*j>=n:
            break
        elif i==j:
            count+=1
        else:
            count+=2
if (int(n**(1/2)))**2==n:
    print(count)
else:
    print(count+1)

# Fixed code:
n=int(input())
count=0
for i in range(1,int(n**(1/2))+1):
    for j in range(i,n):
        if i*j>=n:
            break
        elif i==j:
            count+=1
        else:
            count+=2
print(count)
# Buggy code:
N=int(input())
ans=1
def test(n):
    buf=0
    for i in range(1,n):
        if i**2 > n:
            break
        if i**2 == n:
            buf+=1
            break
        if n%i==0:
            buf+=2
    return buf

def ans(n):
    if n==2:
        return 1
    return test(n-1) + ans(n - 1)

print(ans(N))


# Fixed code:
N=int(input())
def test(n):
    buf=0
    for i in range(1,n):
        if i**2 > n:
            break
        if i**2 == n:
            buf+=1
            break
        if n%i==0:
            buf+=2
    return buf

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

print(ans)
# Buggy code:
N=int(input())
ans=0
for i in range(1,int(N**(1/2))+1):
    a=N//i
    ans+=(a-i)*2+1
print(ans)

# Fixed code:
N=int(input())
ans=0
for i in range(1,int(N**(1/2))+1):
    a=(N-1)//i
    ans+=(a-i)*2+1
if int(N**(1/2))**2==N:
    ans+=1
print(ans)
# Buggy code:
n = int(input())
count = 0
for a in range(1,n):
    count += int((n-1)/a)
print(count)n = int(input())
count = 0
for a in range(1,n):
    count += int((n-1)/a)
print(count)

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

j = 0

ans = 0

for i in range(1, n // 2):
    
    j = i
    
    while True:
        j += 1
        if i * j > n:
            break
        ans += 1

k = 1

er = 0

while True:
    if k ** 2 > n:
        break
    er += 1
    k += 1

print((ans * 2) + er)

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

j = 0

ans = 0

for i in range(1, n):
    
    j = i
    
    while True:
        j += 1
        if i * j > n:
            break
        ans += 1


k = 1

er = 0

while True:
    er += 1
    if k ** 2 > n:
        break
    k += 1


print((ans * 2) + er - 1)
# Buggy code:
N = int(input())
NR = int(N**0.5)
count = 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)

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

count = 0

for i in range(1, n//2):
    temp = n // i
    if temp * i < n:
        count += temp
    else:
        count += temp - 1

print(count + n//2)


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

count = 0
start = n//2
if (n % 2 == 1):
    start += 1

for i in range(1, start):
    temp = n // i
    if temp * i < n:
        count += temp
    else:
        count += temp - 1

print(count + n//2)
# Buggy code:

n = int(input())
n_all = 10**(n) % mod
bad_0 = 9**(n)%mod
bad_9 = 9**(n)%mod
bad_18 = 8**(n)%mod

print(n_all-bad_0-bad_9+bad_18)

# Fixed code:
n = int(input())
mod = (10**9)+7
n_all = 10**(n) % mod
bad_0 = 9**(n)%mod
bad_9 = 9**(n)%mod
bad_18 = 8**(n)%mod

print((n_all-bad_0-bad_9+bad_18)%mod)
# Buggy code:
N = int(input())

a = 2*(10^N-9^N)-(10^N-8^N)
ans = a % (10^9+7)
print(ans)

# Fixed code:
N = int(input())
a = 2 * (10**(N) - 9**(N)) - (10**(N) - 8**(N))        
ans = a % (10**9+7)
print(ans)
# Buggy code:
mod = 10**9+7
N = int(input())
ans = pow(10, N, mod)
a = pow(9, N, mod)
b = pow(8, N, mod)
print(ans, a, b)
ans-=2*a-b
ans%=mod
print(ans)

# Fixed code:
mod = 10**9+7
N = int(input())
ans = pow(10, N, mod)
a = pow(9, N, mod)
b = pow(8, N, mod)

ans-=2*a-b
ans%=mod
print(ans)
# Buggy code:
n = int(input(''))

mod = 1000000007

cnt_all= 10**n
cnt_90=8**n
cnt_9=9**n
cnt_0=9**n
cnt=cnt_all + cnt_90 - cnt_9 - cnt_0
#print("{} - {} - {} + {} = {}".format(cnt_all,cnt_9,cnt_0,cnt_90,cnt))
print(cnt)


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

mod = 1000000007

cnt_all= 10**n%mod
cnt_90=8**n%mod
cnt_9=9**n%mod
cnt_0=cnt_9%mod
cnt=(cnt_all + cnt_90 - cnt_9 - cnt_0)%mod
#print("{} - {} - {} + {} = {}".format(cnt_all,cnt_9,cnt_0,cnt_90,cnt))
print(cnt)
# Buggy code:
N = int(input())
comb = 10**N-2*(9**N-8**N)
print(comb%(10**9+7))

# Fixed code:
N = int(input())
comb = 10**N-2*9**N+8**N
print(comb%(10**9+7))
# Buggy code:
# AtCoder Beginner Contest 178
# C - Ubiquity
import math

N=int(input())

mod=10**9+7

print((10**N)%mod-(9**N)%mod)-(9**N)%mod+(8**N)%mod)

# Fixed code:
# AtCoder Beginner Contest 178
# C - Ubiquity

N=int(input())

mod=10**9+7

print(((10**N)-(9**N)-(9**N)+(8**N))%mod)
# Buggy code:
N = int(input())

mod = 10**9+7

if N == 1:
    print(0)
elif N == 2:
    print(1)
else:
    tmp = (2*(pow(10,N,mod)-pow(9,N,mod))-(pow(10,N,mod)-pow(8,N,mod)))
    print(tmp)
    

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

mod = 10**9+7

if N == 1:
    print(0)
elif N == 2:
    print(2)
else:
    tmp = 2*(pow(10,N,mod)-pow(9,N,mod))-(pow(10,N,mod)-pow(8,N,mod))
    print(tmp%mod)
# Buggy code:
n = int(input())
ans = 1
ans2 = 1
mod = 1000000007
for i in range(n):
	ans = (ans*10)%mod
    ans2 = (ans2*8)%mod
ans = (ans - ans2 + mod)%mod
print(ans)

# Fixed code:
n = int(input())
ans = 1
ans1 = 1
ans2 = 1
mod = 1000000007
for i in range(n):
	ans = (ans*10)%mod
	ans2 = (ans2*8)%mod
	ans1 = (ans1*9)%mod
ans = (ans - ans1 + mod)%mod
ans = (ans - ans1 + mod)%mod
ans = (ans + ans2)%mod
print(ans)
# Buggy code:
 tmp = 10 ** 9 + 7
def div(n,T):
    _ = 1
    for t in range(T):
        _ *= n
        _ %= tmp
    return _
    
N = int(input())
a = div(10,N)
b = div(9,N)
c = div(8,N)

print((a + c - 2 * b) % tmp


# Fixed code:
def div(n,T):
    tmp = 10 ** 9 + 7
    _ = 1
    for t in range( T- 1):
        _ *= n
        _ %= tmp
    return _ * n
    
N = int(input())
a = div(10,N)
b = div(9,N)
c = div(8,N)
print((a + c - b * 2) % (10 ** 9 + 7))
# Buggy code:
N = int(input())
a = (10**N-8**N)%(10**9+7)
print(a)

# Fixed code:
N = int(input())
a = (10**N+8**N-2*(9**N))%((10**9)+7)
print(a)
# Buggy code:
n,m=int(input()),10**9+7
print((pow(10,p,m)-2*pow(9,p,m)+pow(8,p,m))%m)

# Fixed code:
n,m=int(input()),10**9+7
print((pow(10,n,m)-2*pow(9,n,m)+pow(8,n,m))%m)
# Buggy code:
# -*- coding: utf-8 -*-
MOD=1000000007
x = int(input())
n1 = (10**x)%MOD
n2 = 2*9**x%MOD
n3 = 8**x%MOD
print(n1, n2, n3)
n = n1-n2+n3
print(int(n))

# Fixed code:
# -*- coding: utf-8 -*-
MOD=1000000007
x = int(input())
n1 = (10**x)%MOD
n2 = 2*9**x%MOD
n3 = 8**x%MOD
n = (n1-n2+n3+MOD)%MOD
print(int(n))
# Buggy code:
N = int(input())


def ruizyou(x, n, S=1):
    
    S = 1
    for _ in range(n):
        S = (S*x)%(1e9+7)
    
    return S
    
a = int( ruizyou(10, N) + ruizyou(8, N) - ruizyou(9, N)*2 )

print(a%(1e9+7))

# Fixed code:
N = int(input())
 
 
def ruizyou(x, n, S=1):
    
    S = 1
    for _ in range(n):
        S = (S*x)%(1e9+7)
    
    return S
    
a = int( ruizyou(10, N) + ruizyou(8, N) - ruizyou(9, N)*2 )
 
print(int(a%(1e9+7)))
# Buggy code:
n = int(input())
ans = (10**n)%-2*(9**n)+8**n
print(ans%(10**9+7))


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

ans = ((((10 ** n) - (9 ** n)) * 2) - ((10 ** n) - (8 ** n))) % (10 ** 9 + 7) 
print(ans)
# Buggy code:
n = int(input())
mod = 10**9+7

def pow(n, num):
  s = num
  for i in range(1,num):
    s = s*num%mod
    return s
print((pow(n,10) - 2*pow(n,9) + pow(n,8))%mod)

# Fixed code:
n = int(input())
mod = 10**9+7

def pow(n, num):
  s = num
  for i in range(1,n):
    s = s*num%mod
  return s
print((pow(n,10) - 2*pow(n,9) + pow(n,8))%mod)
# Buggy code:
def main():
    N = int(input())
        
    A = 1
    countA = 0
    for i in range(N):
        if A*10 >= 10**9 + 7:
            countA += 1
        A = (A*10)%(10**9 + 7)
        
    B = 1
    countB = 0
    for i in range(N):
        if B*9 >= 10**9 + 7:
            countB += 1
        B = (B*9)%(10**9 + 7)
        
    C = 1
    countC = 0
    for i in range(N):
        if C*8 >= 10**9 + 7:
            countC += 1
        C = (C*8)%(10**9 + 7)
        
    Z = B*(countB-countC)*(10**9 + 7) - C
        
    ans = (A*(countA-countC)*(10**9 + 7) - 2*Z - C) % (10**9 + 7)
        
    print(ans)
    
if __name__ == '__main__':
    main()

# Fixed code:
def main():
    N = int(input())
        
    A = 1
    countA = 0
    for i in range(N):
        A = (A*10)%(10**9 + 7)
        
    B = 1
    countB = 0
    for i in range(N):
        B = (B*9)%(10**9 + 7)
        
    C = 1
    countC = 0
    for i in range(N):
        C = (C*8)%(10**9 + 7)
        
    ans = (A - 2*B + C)%(10**9 + 7)
        
    print(ans)
    
if __name__ == '__main__':
    main()
# Buggy code:
MOD = 10**9+7

n = int(input())
print((2*pow(10, max(0, n-2), MOD) + (n*(n-1)-2)*pow(8, max(0, n-2), MOD)) % MOD)


# Fixed code:
MOD = 10**9+7

n = int(input())
print((pow(10, max(n, 0), MOD) - pow(9, max(n, 0), MOD) -
       pow(9, max(n, 0), MOD) + pow(8, max(n, 0), MOD)) % MOD)
# Buggy code:

n = int(input())
mod = 10**9 +7

if n == 1:
    print(0)
elif n == 2:
    print(2)
else:
    print((10**n%mod)-(8**n%mod))

# Fixed code:
n = int(input())
mod = 10**9 +7

if n == 1:
    print(0)
elif n == 2:
    print(2)
else:
    print(((10**n)-2*(9**n)+(8**n))%mod)
# Buggy code:
n=int(input())
mod=10**9+7
ans=pow(n,10,mod)
ans-=2*pow(n,9,mod)
ans+=pow(n,8,mod)
print(ans%mod)

# Fixed code:
mod = 10 ** 9 + 7
N = int(input())

ans = pow(10, N, mod)
ans -= 2 * pow(9, N, mod)
ans += pow(8, N, mod)

print(ans % mod)
# Buggy code:
n=int(input())
if n==1:
  print(0)
else:
  print((10**n-(8*10**(n-1))-2*(9**(n-1)))%(10**9+7))

# Fixed code:
n = int(input())
mod = 10**9+7

if n==1:
    print(0)
else:
    print(((10**n)-(9**n)-(9**n)+(8**n))%mod)
# Buggy code:
def main():
  MOD = int(1e9 + 7)
  n = int(input())
  print((pow(10,n,MOD) - 2*pow(9 , n , MOD)%MOD + pow(8 , n , MOD) + MOD)%MOD)

if __namme__ == "__main__":
  main()

# Fixed code:
def main():
  MOD = int(1e9 + 7)
  n = int(input())
  print((pow(10,n,MOD) - 2*pow(9 , n , MOD)%MOD + pow(8 , n , MOD) + MOD)%MOD)
 
if __name__ == "__main__":
  main()
# Buggy code:
n = int(input())
if n == 1:
    print(0)
if n == 2:
    print(2)
else:
    print((10**n-(2*9**n-8**n))%(10**9+7))

# Fixed code:
n = int(input())
if n == 1:
    print(0)
    exit()
if n == 2:
    print(2)
    exit()
else:
    print((10**n-(2*9**n-8**n))%(10**9+7))
# Buggy code:
n = int(input())

if n == 1:
    print(0)

mod = 10 ** 9 + 7

ans = pow(10, n, mod) - 2 * pow(9, n, mod) + pow(8, n, mod)
ans %= mod

print(ans)


# Fixed code:
n = int(input())
mod = 10**9+7

if n == 1:
    print(0)
    exit()
    
ans = pow(10,n,mod)
ans -= pow(9,n,mod)*2
ans += pow(8,n,mod)
ans %= mod
print(ans)
# Buggy code:
N = int(input())
print((10**N - 9 ** N - 9**N + 8**N) % (10**9 - 7))

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

print(((10 ** N - 2 * 9 ** N + 8 ** N) % (10 ** 9 + 7)))
# Buggy code:
MOD = int(1e9 + 7)
n=int(input())
print(10 ** n - 9 ** n - 9 ** n + 8 ** n % MOD)

# Fixed code:
MOD = int(1e9 + 7)
n=int(input())
ans = 10 ** n % MOD
ans -= 9 ** n % MOD
ans -= 9 ** n % MOD
ans += 8 ** n % MOD
ans %= MOD
print(ans)
# Buggy code:
N = int(input())

MOD = 10**9 + 7

if N==1:
    print(0)
elif N==2:
    print(2)
else:
    tmp = (N*(N-1))%MOD
    
    ans = pow(10, N-2, MOD)
    
    ans = (ans*tmp)%MOD
        
    print(ans)

# Fixed code:
N = int(input())
 
MOD = 10**9 + 7
 
if N==1:
    print(0)
elif N==2:
    print(2)
else:
    ans = pow(10,N,MOD) - 2*pow(9,N,MOD) + pow(8,N,MOD)
    ans = ans%MOD
    print(ans)
# Buggy code:
def main():
    N = input()
    print((10 ** N - 9 ** N - 9 ** N + 8 ** N)%(10**9 + 7))

main()

# Fixed code:
def main():
    N = int(input())
    print((10**N - 9**N - 9**N + 8**N)%(10**9 + 7))

main()
# Buggy code:
n=int(input())
print((10**n-9**n*2+8**n)%10**9+7)

# Fixed code:
n=int(input())
p=10**9+7
print((10**n-2*9**n+8**n)%p)
# Buggy code:
M = 10**9 + 7
n = int(input())
print((pow(10, n, M) - 2 * pow(9, n, M) + pow(8, n, M) % M)


# Fixed code:
M = 10**9 + 7
n = int(input())
print((pow(10, n, M) - 2 * pow(9, n, M) + 8**n) % M)
# Buggy code:
n=int(input())
M=10**9+7
print((pow(10,n,M)-pow(8,n,M))%M)

# Fixed code:
n=int(input())
M=10**9+7
print((pow(10,n,M)+pow(8,n,M)-2*pow(9,n,M))%M)
# Buggy code:
#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

M = 10**9+7
n = inp()
dp = [0]*2001
if n <= 2:
    print(dp[n])
    exit()
dp[0] = 1
t = 0
for i in range(3,n+1):
    t += dp[i-3]
    dp[i] = t
print(dp[n])

# Fixed code:
#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

M = 10**9+7
n = inp()
dp = [0]*2001
if n <= 2:
    print(dp[n])
    exit()
dp[0] = 1
t = 0
for i in range(3,n+1):
    t += dp[i-3]
    dp[i] = t%M
print(dp[n]%M)
# Buggy code:
N=int(input())
DP=[0]*(N+1)
DP[3]=1
tmp=0
mod=10**9+7
for i in range(4,N+1):
   DP[i]=(DP[i-1]+DP[i-3])%mod
print(DP[N]%mod)

# Fixed code:
N=int(input())
DP=[0]*(N+1)
tmp=0
mod=10**9+7
if N<3:
   print(0)
   exit()
DP[3]=1
for i in range(4,N+1):
   DP[i]=(DP[i-1]+DP[i-3])%mod
print(DP[N]%mod)
# Buggy code:
import math
N = input()
N = int(N)
x = N / 3
p = 10 **9 + 7
if x == 0:
  print(0)
sum = 0
else:
  for k in range(x):
  y = N - 3 * k
  l = k - 1
  M = y + l
  a = math.factorial(l)
  b = math.factorial(M) 
  c = math.factorial(y)
  z = b / a / c
  z = z % p
  sum += z

print(z)

  

  

# Fixed code:
import math
N = input()
N = int(N)
x = N // 3
x = int(x)
p = 10 ** 9 + 7
sum = 0
if x == 0:
  print(0)
else:
  for k in range(x):
    y =  N - 3*k - 3
    l = k 
    M = y + l
    a = math.factorial(l)
    b = math.factorial(M) 
    c = math.factorial(y)
    d = a * c
    z = b // d
    z = z % p
    sum += z
    sum = sum %p

  sum = int(sum)
  print(sum)
# Buggy code:
s = int(input())
MOD = 1000000007
dp = [0] * (s+1)
dp[0] = 1
for i in range(1, s+1):
    for j in range(0, (i-3)+1):
        dp[i] += dp[j]
        dp[i] %= MOD

print(dp)

# Fixed code:
s = int(input())
MOD = 1000000007
dp = [0] * (s+1)
dp[0] = 1
for i in range(1, s+1):
    for j in range(0, (i-3)+1):
        dp[i] += dp[j]
        dp[i] %= MOD

print(dp[s])
# Buggy code:
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)


def C(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def main():
    s = ni()
    mod = 10 ** 9 + 7
    ans = [0] * 2001
    for i in range(6):
        ans[i] = 1
    for i in range(6, s + 1):
        ans[i] = (ans[i - 1] + ans[i - 3]) % mod
    print(ans[s])


if __name__ == '__main__':
    main()


# Fixed code:
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)


def C(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def main():
    s = ni()
    mod = 10 ** 9 + 7
    ans = [0] * 2001
    ans[0] = 1
    for i in range(3, 6):
        ans[i] = 1
    for i in range(6, s + 1):
        ans[i] = (ans[i - 1] + ans[i - 3]) % mod
    print(ans[s])


if __name__ == '__main__':
    main()
# Buggy code:
MOD = 10**9 + 7
dp = {0: 1}

S = int(input())
for s in range(3, S+1):
  for term in range(3, s+1):
    if s - term < 0:
      break
    else:
      dp[s] = dp.get(s-term, 0) + dp.get(s, 0) % MOD

print(dp[S])

# Fixed code:
MOD = 10**9 + 7
dp = {0: 1}

S = int(input())
for s in range(3, S+1):
  for term in range(3, s+1):
    if s - term < 0:
      break
    else:
      dp[s] = dp.get(s-term, 0) + dp.get(s, 0) % MOD

print(dp.get(S, 0))
# Buggy code:
S = int(input())
mod = 10**9 + 7

memo = []
for i in range(S//3):
    for j in range(S-3*i-2):
        if j == 0:
            memo.append([1])
        else:
            if i == 0:
                x = 1
                memo[i].append(x)
            else:
                x = (memo[i][j-1]+memo[i-1][j])%mod
                memo[i].append(x)
ans = 0
for i in range(S//3):
    ans = (ans + memo[i][S-3*(i+1)])%mod
print(memo)
print(ans)


# Fixed code:
S = int(input())
mod = 10**9 + 7

memo = []
for i in range(S//3):
    for j in range(S-3*i-2):
        if j == 0:
            memo.append([1])
        else:
            if i == 0:
                x = 1
                memo[i].append(x)
            else:
                x = (memo[i][j-1]+memo[i-1][j])%mod
                memo[i].append(x)
ans = 0
for i in range(S//3):
    ans = (ans + memo[i][S-3*(i+1)])%mod
print(ans)
# Buggy code:
S = int(input())
mod = 10**9+7

dp = [1]+[0]*(S-1)

for i in range(0, S+1):
    for j in range(3, S-2):
        dp[i] += dp[j]

print(dp[S]%mod) 


# Fixed code:
S = int(input())
mod = 10**9+7

dp = [1]+[0]*S

for i in range(1, S+1):
    for j in range(0, i-2):
        dp[i] += dp[j]

print(dp[S]%mod)
# Buggy code:
import sys
import threading

S = int(input())
A = [-1 for _ in range(S+1)]
A[0] = 0
A[1] = 0
A[2] = 0
A[3] = 1
A[4] = 1
A[5] = 1

for i in range(S+1):
  if A[i] == -1:
    A[i] = A[i-1] + A[i-3]
print(A[S]%(10**9+7))

# Fixed code:
import sys
import threading

S = int(input())
A = [-1 for _ in range(2001)]
A[0] = 0
A[1] = 0
A[2] = 0
A[3] = 1

for i in range(S+1):
  if A[i] == -1:
    A[i] = A[i-1] + A[i-3]

print(A[S]%(10**9+7))
# Buggy code:
S = int(input())

l = [1,1]
for i in range(2,S+1) :
    l.append(l[-1]*i)

ans = 0
for i in range(S//3) :
    kou = i+1
    maru = S - 3*kou
    shikiri = i
    ans += l[maru+shikiri] / (l[maru]*l[shikiri])

print(int(ans%((10**9)+7)))


# Fixed code:
S = int(input())
m = (10**9)+7
l = [1,1]
for i in range(2,S+1) :
    l.append(l[-1]*i)

ans = 0
for i in range(S//3) :
    kou = i+1
    maru = S - 3*kou
    shikiri = i
    ans += l[maru+shikiri] // (l[maru]*l[shikiri])

print(int((ans%m)))