n = int(eval(input()))

m = 10**9 + 7

# ans = [0] * (n + 1)

ans = [0] * 2200

ans[0] = 1

# ans[3] = 1

# ans[4] = 1

# ans[5] = 1

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

    for j in range(i - 2):

        ans[i] += ans[j]

        ans[i] %= m

print((ans[n]))

# print(ans[:10])

n = int(eval(input()))

m = 10**9 + 7

# ans = [0] * (n + 1)

ans = [0] * 2200

ans[0] = 1

# ans[3] = 1

# ans[4] = 1

# ans[5] = 1

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

    ans[i] = ans[i - 1] + ans[i - 3]

    ans[i] %= m

    # for j in range(i - 2):

    #     ans[i] += ans[j]

    #     ans[i] %= m

print((ans[n]))

# print(ans[:10])

n = int(eval(input()))
m = 10**9 + 7
# ans = [0] * (n + 1)
ans = [0] * 2200
ans[0] = 1
# ans[3] = 1
# ans[4] = 1
# ans[5] = 1
for i in range(3, n + 1):
    for j in range(i - 2):
        ans[i] += ans[j]
        ans[i] %= m
print((ans[n]))
# print(ans[:10])

n = int(eval(input()))
m = 10**9 + 7
# ans = [0] * (n + 1)
ans = [0] * 2200
ans[0] = 1
# ans[3] = 1
# ans[4] = 1
# ans[5] = 1
for i in range(3, n + 1):
    ans[i] = ans[i - 1] + ans[i - 3]
    ans[i] %= m
    # for j in range(i - 2):
    #     ans[i] += ans[j]
    #     ans[i] %= m
print((ans[n]))
# print(ans[:10])

-    for j in range(i - 2): -        ans[i] += ans[j] -        ans[i] %= m +    ans[i] = ans[i - 1] + ans[i - 3] +    ans[i] %= m +    # for j in range(i - 2): +    #     ans[i] += ans[j] +    #     ans[i] %= m