S=int(eval(input()))

memo=[0]*2001

def rec(a):

    if memo[a]!=0:

        return memo[a]

    if a<3:

        return 0



    ans=1

    tmp=0

    while a-3-tmp>=3:

        ans+=rec(a-3-tmp)

        tmp+=1

    memo[a]=ans

    return ans



print((rec(S) % 1000000007))
S=int(eval(input()))

MOD=1000000007

dp=[0]*2001

dp[3]=1

dp[4]=1

dp[5]=1

for i in range(6,S+1):

    tmp=1

    for j in range(3,i-2):

        tmp+=dp[j]

        tmp%=MOD

    dp[i]=tmp

print(( dp[S]))

S = int(eval(input()))
memo = [0] * 2001


def rec(a):
    if memo[a] != 0:
        return memo[a]
    if a < 3:
        return 0
    ans = 1
    tmp = 0
    while a - 3 - tmp >= 3:
        ans += rec(a - 3 - tmp)
        tmp += 1
    memo[a] = ans
    return ans


print((rec(S) % 1000000007))

S = int(eval(input()))
MOD = 1000000007
dp = [0] * 2001
dp[3] = 1
dp[4] = 1
dp[5] = 1
for i in range(6, S + 1):
    tmp = 1
    for j in range(3, i - 2):
        tmp += dp[j]
        tmp %= MOD
    dp[i] = tmp
print((dp[S]))

-memo = [0] * 2001 - - -def rec(a): -    if memo[a] != 0: -        return memo[a] -    if a < 3: -        return 0 -    ans = 1 -    tmp = 0 -    while a - 3 - tmp >= 3: -        ans += rec(a - 3 - tmp) -        tmp += 1 -    memo[a] = ans -    return ans - - -print((rec(S) % 1000000007)) +MOD = 1000000007 +dp = [0] * 2001 +dp[3] = 1 +dp[4] = 1 +dp[5] = 1 +for i in range(6, S + 1): +    tmp = 1 +    for j in range(3, i - 2): +        tmp += dp[j] +        tmp %= MOD +    dp[i] = tmp +print((dp[S]))