#include <iostream>
#include <map>
using namespace std;

unsigned long long fact(int n){
  unsigned long long x=1;
  for(unsigned long long i=1;i<=n;++i)x*=i;
  return x;
}

int main(){
  string s;cin>>s;
  map<char,int> c;
  for(int i=0;i<s.size();++i){
    ++c[s[i]];
  }
  
  int odd=0;
  for(map<char,int>::iterator it=c.begin();it!=c.end();++it){
    odd+=((it->second) % 2)? 1 : 0;
  }
  
  if(odd<=1){
  	if((odd==1&&s.size()%2==0) || (odd==0&&s.size()%2==1)){
  		cout<<0<<endl;
  	}else{
	    int len=s.size()/2;
	    unsigned long long ans=fact(len);
	    for(map<char,int>::iterator it=c.begin();it!=c.end();++it){
	      ans/=fact(it->second/2);
	    }
	    cout<<ans<<endl;
    }
  }else{
    cout<<0<<endl;
  }
  return 0;
}