# coding:utf-8

p = 1000000000+7
N = int(input())
dp = [0] * (N+10)
dp[0] = 1
dp[1] = 2
dp[2] = 2
pa_point = [0]*(N+10)
pa_point[1] = 1
pa_point[2] = 1
pa_point[3] = 1
pa_point[4] = 2
pa_point[5] = 1
for i in range(3,N+1):
    # print(i,dp[i-1],pa_point[i-2],'ans:',dp[i-1]+pa_point[i-2]%p)
    # print(i,pa_point)
    dp[i] = (dp[i-1]+pa_point[i-2])%p
    if pa_point[i]>0 and i >2:
        pa_point[i+2] = (pa_point[i+2]+pa_point[i])%p
        pa_point[i+3] = (pa_point[i+3]+pa_point[i])%p
    # print(pa_point)
    # print(dpoint)
# print(dp)
# print(pa_point)
print(dp[N-1]%p)