var inp=(""+require("fs").readFileSync(0)).split("\n");
var n=+inp[0];
var s=inp[1];

var left=s.slice(0,n);
var right=s.slice(n).split("").reverse().join("");

var mp={};

for(var b=1<<n;b--;){
  var red="",blue="";
  for(var i=0;i<n;i++)
    if(b&(1<<i))red+=left[i];
  	else blue+=left[i];
  if(red+","+blue in mp)
    mp[red+","+blue]++;
  else
    mp[red+","+blue]=1;
}

var ans=0;

for(var b=1<<n;b--;){
  var red="",blue="";
  for(var i=0;i<n;i++)
    if(b&(1<<i))red+=right[i];
  	else blue+=right[i];
  if(red+","+blue in mp)
    ans+=mp[red+","+blue];
}

console.log(ans);
