#include <bits/stdc++.h>
using namespace std;
long long dp[61][61][61];
int main() {
  memset(dp, 0, sizeof(dp));
  dp[0][0][0] = 1;
  for (int i = 0; i <= 60; i++) {
    for (int j = 0; j <= 60; j++) {
      for (int k = 0; k <= 60; k++) {
        if (!i && !j && !k) continue;
        if (i >= 2 && j >= 1 && (i == j + 1 || i == j))
          dp[i][j][k] += dp[i - 2][j - 1][k];
        if (i >= 1 && j >= 2 && (i + 1 == j || i == j))
          dp[i][j][k] += dp[i - 1][j - 2][k];
        if (j >= 1 && k >= 2 && (j + 1 == k || j == k))
          dp[i][j][k] += dp[i][j - 1][k - 2];
        if (j >= 2 && k >= 1 && (j == k + 1 || j == k))
          dp[i][j][k] += dp[i][j - 2][k - 1];
      }
    }
  }
  int n;
  while (scanf("%d", &n) == 1) {
    printf("%I64d\n", dp[n][n][n]);
  }
  return 0;
}
