#include "bits/stdc++.h"
#define REP(i,n,N) for(ll i=(n); i<(N); i++)
#define RREP(i,n,N) for(ll i=(N-1); i>=n; i--)
#define CK(n,a,b) (a)<=(n)&&(n)<(b)
#define ALL(v) (v).begin(),(v).end()
#define p(s) cout<<(s)<<endl
typedef long long ll;
using namespace std;
const ll mod =1e9+7;


ll N;
ll dp[1000010][3];
ll ans;
int main(){
    scanf("%lld", &N);
    dp[0][0]=1;
    REP(i,0,N){
        REP(j,0,3){
            if(j<2){
                dp[i+1][j+1] += dp[i][j];
                dp[i+1][j+1]%=mod;
            }
            if(j>0) {
                dp[i+1][0] += dp[i][j];
                dp[i+1][0]%=mod;
            }
        }
    }
    REP(j,0,3){
        ans += dp[N][j];
        ans%=mod;
    }
    printf("%lld\n", ans);
    return 0;
}