/*
Name: NYOJ--491--幸運三角形
Author: shen_淵
Date: 15/04/17 16:26
Description: DFS超時,深搜出第一行的所有情況,計算之後打表水過
0,0,0,4,6,0,0,12,40,0,0,171,410,0,0,1896,5160,0,0,32757
*/
#include<iostream>
#include<cstring>
using namespace std;
const char ADD = '+';
const char SUB = '-';
void dfs(int);
void cal();
int n,counter;
string str;
int main()
{
// freopen("in.txt","r",stdin);
// freopen("out.txt","w",stdout);
while(cin>>n){
counter = 0;
str = "";
dfs(0);
cout<<counter<<endl;
}
return 0;
}
void dfs(int ct){
if(ct == n){
cal();
return;
}else{
str[ct] = ADD;
dfs(ct+1);
str[ct] = SUB;
dfs(ct+1);
}
}
void cal(){
int t = n;
int suma=0,sums=0;
while(t){
int i;
for(i=0; i<t; ++i){
if(str[i] == ADD)suma++;
else sums++;
}
for(i=0; i<t-1; ++i){
if(str[i] == str[i+1])str[i] = ADD;
else str[i] = SUB;
}
t--;
}
if(suma == sums)counter++;
}
#include<iostream>
using namespace std;
int arr[20] = {0,0,0,4,6,0,0,12,40,0,0,171,410,0,0,1896,5160,0,0,32757};
int main()
{
int n;
ios::sync_with_stdio(false);
while(cin>>n){
cout<<arr[n]<<endl;
}
return 0;
}