n = int(eval(input()))

mx = n//3

ans = 0

mod = 10**9+7

import math

def combinations_count(n, r): #組み合わせ(nCr)

    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

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

    if i == 1:

        ans += 1

    else:

        ans += combinations_count(n-2*i-1,i-1) % mod

print((ans%mod))
s = int(eval(input()))

dp = [0]*(2001)

dp[3] = 1

mod = 10**9+7

for i in range(4,s+1):

    dp[i] = (dp[i-1] + dp[i-3]) % mod

print((dp[s]))
n = int(eval(input()))
mx = n // 3
ans = 0
mod = 10**9 + 7
import math


def combinations_count(n, r):  # 組み合わせ(nCr)
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


for i in range(1, mx + 1):
    if i == 1:
        ans += 1
    else:
        ans += combinations_count(n - 2 * i - 1, i - 1) % mod
print((ans % mod))

s = int(eval(input()))
dp = [0] * (2001)
dp[3] = 1
mod = 10**9 + 7
for i in range(4, s + 1):
    dp[i] = (dp[i - 1] + dp[i - 3]) % mod
print((dp[s]))

-n = int(eval(input())) -mx = n // 3 -ans = 0 +s = int(eval(input())) +dp = [0] * (2001) +dp[3] = 1 -import math - - -def combinations_count(n, r):  # 組み合わせ(nCr) -    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) - - -for i in range(1, mx + 1): -    if i == 1: -        ans += 1 -    else: -        ans += combinations_count(n - 2 * i - 1, i - 1) % mod -print((ans % mod)) +for i in range(4, s + 1): +    dp[i] = (dp[i - 1] + dp[i - 3]) % mod +print((dp[s]))