#include #include #include #include #include #include #include using namespace std; const int mod = 1000000007; int n; int dp[1000001][2][2]; int main(){ cin >> n; dp[1][0][0] = 1; dp[2][0][0] = 1; dp[2][1][0] = 1; for (int i = 3; i <= n; i++){ dp[i][0][0] = dp[i - 1][0][1]; dp[i][1][0] = dp[i - 1][0][1] + dp[i - 1][0][0]; dp[i][0][1] = dp[i - 1][1][0]; dp[i][0][0] %= mod; dp[i][1][0] %= mod; dp[i][0][1] %= mod; } int ans = (dp[n][0][0] + dp[n][0][1]) % mod; ans = (ans + dp[n][1][0]) % mod; cout << ans << endl; return 0; }