#include <iostream>
#include <vector>
#include <string>
using ll = long long;
#define rep(i, n) for(ll i = 0; i < n; i++)
#define rep2(i, s, n) for(ll i = s; i < n; i++)
using namespace std;

const ll MOD = 1000000007;
int dp[110][5][5][5][5];
int main(){
  ll n;
  cin >> n;
  dp[0][0][0][0][0] = 1;
  rep(i, n)rep(c1, 5)rep(c2, 5)rep(c3, 5)rep(c4, 5)rep2(c5, 1, 5){
    dp[i+1][c2][c3][c4][c5] += dp[i][c1][c2][c3][c4];
    dp[i+1][c2][c3][c4][c5] %= MOD;
    if(c3==1 && c4==3 && c5==2) dp[i+1][c2][c3][c4][c5] = 0;
    if(c2==1 && c4==3 && c5==2) dp[i+1][c2][c3][c4][c5] = 0;
    if(c3==3 && c4==1 && c5==2) dp[i+1][c2][c3][c4][c5] = 0;
    if(c3==1 && c4==2 && c5==3) dp[i+1][c2][c3][c4][c5] = 0;
    if(c2==1 && c3==3 && c5==2) dp[i+1][c2][c3][c4][c5] = 0;
  }
  ll ans = 0;
  rep(c1, 5)rep(c2, 5)rep(c3, 5)rep(c4, 5){
    ans += dp[n][c1][c2][c3][c4];
    ans %= MOD;
  }
  cout << ans << endl;
  
  return 0;
}