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