import array def main(): dp = array.array("Q", [1,2,2]) mod = 10**9 + 7 N = int(input()) for n in range(3, N): dp.append((dp[n-3]+dp[n-2]) % mod) print(dp[-1]) main()