n = int(eval(input()))

mod = 10**9 + 7

import math



def cnt(n, i):

    if i == 1:

        return 1

    else:

        l = n - 3*i

        m = i-1

        return  math.factorial(l + m)//(math.factorial(l)*math.factorial(m))

        



if n == 2 or n == 1:

    print((0))

    exit()

if n == 3:

    print((1))

    exit()

else:

    ans = 0

    iter = n // 3

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

        if i*3 <= n:

            ans += cnt(n, i)%mod

        else:

            continue

        

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

a = [0]*2001

a[3] = 1

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

    a[i] = a[i-3] + a[i-1]

mod = 10**9+7

print((a[s]%mod))
n = int(eval(input()))
mod = 10**9 + 7
import math


def cnt(n, i):
    if i == 1:
        return 1
    else:
        l = n - 3 * i
        m = i - 1
        return math.factorial(l + m) // (math.factorial(l) * math.factorial(m))


if n == 2 or n == 1:
    print((0))
    exit()
if n == 3:
    print((1))
    exit()
else:
    ans = 0
    iter = n // 3
    for i in range(1, iter + 1):
        if i * 3 <= n:
            ans += cnt(n, i) % mod
        else:
            continue
print((ans % mod))

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

-n = int(eval(input())) +s = int(eval(input())) +a = [0] * 2001 +a[3] = 1 +for i in range(4, s + 1): +    a[i] = a[i - 3] + a[i - 1] -import math - - -def cnt(n, i): -    if i == 1: -        return 1 -    else: -        l = n - 3 * i -        m = i - 1 -        return math.factorial(l + m) // (math.factorial(l) * math.factorial(m)) - - -if n == 2 or n == 1: -    print((0)) -    exit() -if n == 3: -    print((1)) -    exit() -else: -    ans = 0 -    iter = n // 3 -    for i in range(1, iter + 1): -        if i * 3 <= n: -            ans += cnt(n, i) % mod -        else: -            continue -print((ans % mod)) +print((a[s] % mod))