#include <stdio.h>
typedef unsigned int uint;
uint proc(uint mask, uint colPut, uint leftLim, uint rightLim) {
if (mask == colPut) {
return 1;
}
uint ans = 0, pos, mostRight;
pos = mask & (~(colPut | leftLim | rightLim));
while (pos != 0) {
mostRight = pos & (~pos + 1);
pos -= mostRight;
ans += proc(mask, colPut | mostRight,
(leftLim | mostRight) << 1,
(rightLim | mostRight) >> 1);
}
return ans;
}
int main(void) {
int n;
scanf("%d", &n);
uint mask = (1 << n) - 1;
printf("%u\n", proc(mask, 0, 0, 0));
return 0;
}