#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() #define rep(i,n) for(int i=0; i pi; typedef pair pl; typedef pair plc; typedef pair pss; int dp[1000010][3]; int mod = (int)(1e9 + 7); int main() { int n; cin >> n; dp[1][1] = 1; for (int i = 2; i <= n; i++) { dp[i][1] = dp[i - 1][0]; dp[i][0] = dp[i - 1][1] + dp[i - 1][2]; dp[i][0] %= mod; dp[i][2] = dp[i - 1][1]; } cout << (((dp[n][1] + dp[n][0])%mod) + dp[n][2] )%mod<< endl; return 0; }