#include "bits/stdc++.h" using namespace std; #define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i)) #define rep(i,j) FOR(i,0,j) #define each(x,y) for(auto &(x):(y)) #define mp make_pair #define all(x) (x).begin(),(x).end() #define debug(x) cout<<#x<<": "<<(x)< pii; typedef vector vi; typedef vector vll; const int MOD = (int)1e9 + 7; void sadd(int &a, int b){ a += b; if(a >= MOD)a -= MOD; else if(a < 0)a += MOD; } int dp[1000001][3]; int main(){ dp[0][0] = 1; int N; cin >> N; rep(i, N)rep(j, 3)if(dp[i][j]){ if(j < 2)sadd(dp[i + 1][j + 1], dp[i][j]); if(j > 0)sadd(dp[i + 1][0], dp[i][j]); } int ans = 0; rep(i, 3)sadd(ans, dp[N][i]); cout << ans << endl; }