using System; public class Hello { public static int MOD = 1000000007; static void Main() { var n = int.Parse(Console.ReadLine().Trim()); goDp(n); } static void goDp(int n) { var dp = new long[n + 1, 3]; dp[1, 0] = 1; for (int i = 2; i <= n; i++) { dp[i, 0] = dp[i - 1, 2]; dp[i, 0] %= MOD; dp[i, 1] = dp[i - 1, 0]; dp[i, 1] %= MOD; dp[i, 2] = dp[i - 1, 0] + dp[i - 1, 1]; dp[i, 2] %= MOD; } var ans = 0L; for (int i = 0; i < 3; i++) { ans += dp[n, i]; ans %= MOD; } Console.WriteLine(ans); } }