#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; using Pll = pair; const ll INF = 1LL<<60; const ll MOD = 1000000007; //cout << fixed << setprecision(10); int main() { ll N; cin >> N; vector> dp(N+10,vector(3)); dp[0][0]=1; for(int i=1;i<=N;i++){ dp[i][0]=(dp[i-1][1]+dp[i-1][2])%MOD; dp[i][1]=(dp[i-1][0])%MOD; dp[i][2]=(dp[i-1][1])%MOD; } ll ans=0; for(int i=0;i<3;i++){ ans=(ans+dp[N][i])%MOD; } cout << ans << endl; return 0; }