from functools import*

M=10**9+7

@lru_cache(None)

def f(s):

    if s<3:return 0

    c=1

    for i in range(s-2):

        c+=f(i)

    return(sum(map(f,list(range(s-2))))+1)%M

print((f(int(eval(input())))))
from functools import*

M=10**9+7

@lru_cache(None)

def f(s):

    if s<3:return 0

    return(sum(map(f,list(range(s-2))))+1)%M

print((f(int(eval(input())))))
from functools import *

M = 10**9 + 7


@lru_cache(None)
def f(s):
    if s < 3:
        return 0
    c = 1
    for i in range(s - 2):
        c += f(i)
    return (sum(map(f, list(range(s - 2)))) + 1) % M


print((f(int(eval(input())))))

from functools import *

M = 10**9 + 7


@lru_cache(None)
def f(s):
    if s < 3:
        return 0
    return (sum(map(f, list(range(s - 2)))) + 1) % M


print((f(int(eval(input())))))

-    c = 1 -    for i in range(s - 2): -        c += f(i)