N = int(input()) MOD = 10 ** 9 + 7 dp = [1, 2, 2] for i in range(3, N): dp.append((dp[i - 2] + dp[i - 3]) % MOD) print(dp[N - 1])