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