#include using namespace std; #define ll long long #define REP(i, n) for(int i = 0; i < n; i++) #define FOR(i, m, n) for(int i = m; i < n; i++) const ll MOD = 1e9 + 7; ll dp[100001][3]; int main() { int n; cin >> n; REP(i, n) REP(j, 3) dp[i][j] = 0; dp[1][1] = 1;// K FOR(i, 1, n) { REP(j, 3) { if (j == 0) { (dp[i + 1][1] += dp[i][0]) %= MOD;// P->K } else if (j == 1) { (dp[i + 1][0] += dp[i][1]) %= MOD;// K->P (dp[i + 1][2] += dp[i][1]) %= MOD;// K->KK } else if (j == 2) { (dp[i + 1][0] += dp[i][2]) %= MOD;// KK->P } } } ll ans = 0; REP(j, 3) (ans += dp[n][j]) %= MOD; cout << ans << endl; return 0; }