#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

int main(){
  ll comb[21][21];
  REP(i,21)REP(j,21)comb[i][j]=0;
  comb[0][0] = 1;
  REPR(i,21)REP(j,21){
    comb[i][j] += comb[i-1][j];
    if(j!=0)comb[i][j] += comb[i-1][j-1];
  }
  string s;
  cin >> s;
  ll n = s.size();
  bool odd = n%2==1;
  int cnt[26] = {};
  REP(i,n){
    cnt[s[i]-'a']++;
  }
  if(odd){
    int center = -1;
    REP(i,26){
      if(cnt[i]%2==1){
        if(center == -1){
          center = i;
          cnt[i]--;
        }else{
          cout << 0 << endl;
          return 0;
        }
      }
    }
  }
  ll result = 1;
  ll t = n/2;
  REP(i,26){
    ll s = cnt[i]/2;
    if(s*2 != cnt[i]){
      cout << 0 << endl;
      return 0;
    }
    if(s==0)continue;
    result *= comb[t][s];
    t -= s;
  }
  cout << result << endl;
  return 0;
}