#include<bits/stdc++.h>
using namespace std;
/*
以3,3中心点开始往边界裁剪,共四条四种情况
所以最后结果要除以四
*/
const int N = 10;
int dx[] = {-1,0,1,0} , dy[] = {0,1,0,-1};
//七个点
int n = 7;
//标记是否走过
bool st[N][N];
int ans;
int dfs(int x, int y){
if(x==0||x==6||y==0||y==6) return ans++;
for(int i = 0; i < 4; i++){
int tx = x + dx[i], ty = y + dy[i];
if(st[tx][ty]) continue;
st[tx][ty] = true;
//对称的
st[6-tx][6-ty] = true;
dfs(tx,ty);
//还原回溯路径
st[tx][ty] = false;
st[6-tx][6-ty] = false;
}
return ans;
}
int main(){
//中心点3,3开始
st[3][3] = true;
//四条剪法,四种情况,所以最后结果要除以四
int ans = dfs(3,3) / 4;
printf("%d",ans);
return 0;
}