#include using namespace std; #define dbg(x) (cout<<#x<<" = "<<(x)<<'\n') typedef long long int lld; const int INF = (1LL << 30) - 1; const lld LINF = (1LL << 62) - 1; const int dx[] = {1, -1, 0, 0}; const int dy[] = {0, 0, 1, -1}; int N; vector> viz; int cnt; void back(int top, int x, int y) { if (top == N) { cnt++; return; } viz[x][y] = 1; for (int i = 0, a, b; i < 4; i++) { a = x + dx[i]; b = y + dy[i]; if (viz[a][b]) continue; back(top + 1, a, b); } viz[x][y] = 0; } int main() { cin.sync_with_stdio(false); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif scanf("%d", &N); viz.resize(2 * N + 1); back(1, N, N); if (N == 1) cnt = 2; printf("%d\n", cnt / 2); return 0; }