import numpy as np



MOD = 10**9+7



n = int(eval(input()))

arr = np.zeros((n+1,n+1), dtype=int)

for i in np.arange(3,n+1):

    arr[0,i] = 1



for i in np.arange(1,n+1):

    sum_ = 0

    for j in np.arange(3*i,n+1):

        sum_ += arr[i-1,j]

        sum_ %= MOD

        if j+3 >= n + 1:

            break

        arr[i,j+3] = sum_



ans = 0

for i in range(n+1):

    ans += arr[i,n]

    ans %= MOD

print(ans)













import sys

import numpy as np



def dump(x):

    print(x, file=sys.stderr)





MOD = 10**9+7



N = int(input())

arr = np.zeros((N+1,N+1),dtype=int)

for i in range(3,N+1):

    arr[0,i] = 1



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

    sum_ = 0

    for j in range(3*i,N+1):

        sum_ += arr[i-1,j]

        sum_ %= MOD

        if j+3 >= N + 1:

            break

        arr[i,j+3] = sum_



dump(arr)



ans = 0

for i in range(N+1):

    ans += arr[i,N]

    ans %= MOD

print(ans)

















import numpy as np

MOD = 10**9 + 7
n = int(eval(input()))
arr = np.zeros((n + 1, n + 1), dtype=int)
for i in np.arange(3, n + 1):
    arr[0, i] = 1
for i in np.arange(1, n + 1):
    sum_ = 0
    for j in np.arange(3 * i, n + 1):
        sum_ += arr[i - 1, j]
        sum_ %= MOD
        if j + 3 >= n + 1:
            break
        arr[i, j + 3] = sum_
ans = 0
for i in range(n + 1):
    ans += arr[i, n]
    ans %= MOD
print(ans)

import sys
import numpy as np


def dump(x):
    print(x, file=sys.stderr)


MOD = 10**9 + 7
N = int(input())
arr = np.zeros((N + 1, N + 1), dtype=int)
for i in range(3, N + 1):
    arr[0, i] = 1
for i in range(1, N + 1):
    sum_ = 0
    for j in range(3 * i, N + 1):
        sum_ += arr[i - 1, j]
        sum_ %= MOD
        if j + 3 >= N + 1:
            break
        arr[i, j + 3] = sum_
dump(arr)
ans = 0
for i in range(N + 1):
    ans += arr[i, N]
    ans %= MOD
print(ans)

+import sys + +def dump(x): +    print(x, file=sys.stderr) + + -n = int(eval(input())) -arr = np.zeros((n + 1, n + 1), dtype=int) -for i in np.arange(3, n + 1): +N = int(input()) +arr = np.zeros((N + 1, N + 1), dtype=int) +for i in range(3, N + 1): -for i in np.arange(1, n + 1): +for i in range(1, N + 1): -    for j in np.arange(3 * i, n + 1): +    for j in range(3 * i, N + 1): -        if j + 3 >= n + 1: +        if j + 3 >= N + 1: +dump(arr) -for i in range(n + 1): -    ans += arr[i, n] +for i in range(N + 1): +    ans += arr[i, N]