N = int(input()) mod = 10**9+7 dp = [1, 0, 0] for i in range(1, N): dp = [dp[2], dp[0], (dp[0]+dp[1]) % mod] print(sum(dp) % mod)