Funky chess board(recursion)

my code is passing the sample input. but it’s giving all the test cases wrong. pls point out mistakes

cout<<n * n-path;
this is wrong
not all n * n cells can be used
check if the input cell is 1 only then increase the count of placable variable
then the answer would be
placable_cells - path