#include using namespace std; #include using namespace atcoder; using ll = long long; #define rep(i, n) for (ll i = 0; i < (ll) (n); i++) using mint = modint1000000007; using vm = vector; using vvm = vector; int main() { ll N; cin>>N; vvm DP(N+100,vm(4,0)); DP[0][1]=1; rep(i,N)rep(j,4)rep(k,2){ ll b=j*2+k; if(b==0||b%4==3)continue; DP[i+1][b%4]+=DP[i][j]; } mint an=0; rep(i,4)an+=DP[N][i]; cout<