#include <iostream>
#include <string>

using namespace std;

typedef unsigned long long ull;

const int N = 128;

int data[N], cnt, sum;
ull f[21];
string str;

int main(){
  cin >> str;
  fill(data, data+N, 0);
  for(int i=0;i<str.size();i++) data[str[i]]++;
  cnt = sum = 0;
  for(int i=0;i<N;i++){
    if(data[i] % 2) cnt++;
    data[i] /= 2;
    sum += data[i];
  }
  ull ans;
  if(cnt > 1) ans = 0;
  else{
    f[0] = 1;
    for(int i=1;i<21;i++) f[i] = f[i-1] * i;
    ans = f[sum];
    for(int i=0;i<N;i++) ans /= f[data[i]];
  }
  cout << ans << endl;
}