#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#include<random>
#pragma warning(disable:4996)
using namespace std;
using ld= long double;

long long int comb(int a, int b) {
	long long int sum=1;
	for (int i = 0; i < b; ++i) {
		sum*=a-i;
	}
	for (int i = 0; i < b; ++i) {
		sum/=i+1;
	}
	return sum;
}
int main()
{
	string st;cin>>st;
	map<char,int>mp;
	for (auto c : st) {
		mp[c]++;
	}
	long long int ans=1;
	 {
		int num = count_if(mp.begin(), mp.end(), [](const pair<char, int>&p) {
			return p.second%2;
		});
		if (st.size()%2&&num == 1) {

		}
		else if (st.size() % 2 == 0 && num == 0) {

		}
		else {
			cout<<0<<endl;
			return 0;
		}
	}

	long long int rest=st.size()/2;
	for (auto m : mp) {
		int num=m.second/2;
		ans*=comb(rest,num);
		rest-=num;

	}
	cout<<ans<<endl;
	return 0;
}