S = int(eval(input()))

f = [0]*(S+1)

f[0] = 1

if S >= 3: f[3] = 1

if S >= 4: f[4] = 1

if S >= 5: f[5] = 1

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

    f[i] = sum(f[i-j] for j in range(3, i+1))%(10**9+7)

print((f[S]))

S=int(eval(input()))

f=[1,0,0]

for i in range(S-2):f.append(f[i]+f[i+2])

print((f[S]%(10**9+7)))

S = int(eval(input()))
f = [0] * (S + 1)
f[0] = 1
if S >= 3:
    f[3] = 1
if S >= 4:
    f[4] = 1
if S >= 5:
    f[5] = 1
for i in range(6, S + 1):
    f[i] = sum(f[i - j] for j in range(3, i + 1)) % (10**9 + 7)
print((f[S]))

S = int(eval(input()))
f = [1, 0, 0]
for i in range(S - 2):
    f.append(f[i] + f[i + 2])
print((f[S] % (10**9 + 7)))

-f = [0] * (S + 1) -f[0] = 1 -if S >= 3: -    f[3] = 1 -if S >= 4: -    f[4] = 1 -if S >= 5: -    f[5] = 1 -for i in range(6, S + 1): -    f[i] = sum(f[i - j] for j in range(3, i + 1)) % (10**9 + 7) -print((f[S])) +f = [1, 0, 0] +for i in range(S - 2): +    f.append(f[i] + f[i + 2]) +print((f[S] % (10**9 + 7)))