#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
#include <map>
#include <bitset>
#include <vector>
#include <queue>


typedef long long ll;
#define fi first
#define se second
const ll mod = 1000000007;
//              123456789

using namespace std;

///////////////////////////////////////////////
//
//
///////////////////////////////////////////////

////////////////////////////////////////////////
////////////////////////////////////////////////

ll cost[1123456][4];
ll ans;
int N;


int main(){
	
	int i;
	int j;
	
	cin>>N;
	
	fill( cost[0], cost[N], 0 );
	
	cost[1][1] = 1;
	
	for( i = 1; i <= N; i++ ){
		cost[i+1][1] = cost[i][3];
		cost[i+1][2] = cost[i][1];
		cost[i+1][3] = (cost[i][1]+cost[i][2])%mod;
	}
	
	for( i = 1; i < 4; i++ ){
		(ans += cost[N][i])%=mod;
	}
	
	cout<<ans<<endl;
	
}