s=int(eval(input()))

mod=10**9+7



from operator import mul

from functools import reduce



def cmb(n,r):

    r = min(n-r,r)

    if r == 0: return 1

    over = reduce(mul, list(range(n, n - r, -1)))

    under = reduce(mul, list(range(1,r + 1)))

    return over // under



ans=0



for i in range(1,667):

    x=s-3*i

    if x<0:

        break

    

    ans+=cmb(i+x-1,x)

    ans%=mod





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

mod=10**9+7



dp=[0]*2001



for i in range(3,2001):

  dp[i]+=1

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

    dp[i]+=dp[j]

    dp[i]%=mod

  



    



print((dp[s]))
s = int(eval(input()))
mod = 10**9 + 7
from operator import mul
from functools import reduce


def cmb(n, r):
    r = min(n - r, r)
    if r == 0:
        return 1
    over = reduce(mul, list(range(n, n - r, -1)))
    under = reduce(mul, list(range(1, r + 1)))
    return over // under


ans = 0
for i in range(1, 667):
    x = s - 3 * i
    if x < 0:
        break
    ans += cmb(i + x - 1, x)
    ans %= mod
print(ans)

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

-from operator import mul -from functools import reduce - - -def cmb(n, r): -    r = min(n - r, r) -    if r == 0: -        return 1 -    over = reduce(mul, list(range(n, n - r, -1))) -    under = reduce(mul, list(range(1, r + 1))) -    return over // under - - -ans = 0 -for i in range(1, 667): -    x = s - 3 * i -    if x < 0: -        break -    ans += cmb(i + x - 1, x) -    ans %= mod -print(ans) +dp = [0] * 2001 +for i in range(3, 2001): +    dp[i] += 1 +    for j in range(i - 3, -1, -1): +        dp[i] += dp[j] +        dp[i] %= mod +print((dp[s]))