#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long inf = 1LL << 60;
const long long mod = 1e9 + 7;
const double eps = 1e-9;
long long dp[101][4][4][4];
signed main() {
  long long n;
  cin >> n;
  dp[0][0][0][0] = 1;
  for (long long i = (long long)(0); i < (long long)(n); i++) {
    for (long long j = (long long)(0); j < (long long)(4); j++)
      for (long long k = (long long)(0); k < (long long)(4); k++)
        for (long long l = (long long)(0); l < (long long)(4); l++)
          for (long long m = (long long)(0); m < (long long)(4); m++) {
            if (k == 1 and l == 2 and m == 3) continue;
            if (k == 2 and l == 1 and m == 3) continue;
            if (k == 1 and l == 3 and m == 2) continue;
            if (j == 1 and l == 3 and m == 2) continue;
            if (j == 1 and k == 2 and m == 3) continue;
            dp[i + 1][k][l][m] += dp[i][j][k][l];
          }
  }
  long long ans = 0;
  for (long long j = (long long)(0); j < (long long)(4); j++)
    for (long long k = (long long)(0); k < (long long)(4); k++)
      for (long long l = (long long)(0); l < (long long)(4); l++) {
        ans += dp[n][j][k][l];
      }
  cout << ans << endl;
  return 0;
}
