#include<iostream>
#include<cstdio>
#include <string>
#include <vector>

using namespace std;

int main() {
	string s;
	cin >> s;

	int oddCnt = 0;
	vector<int> c(26, 0);

	for (int i = 0; i < s.size(); i++) {
		c[s[i] - 'a']++;
	}

	long long cnt = 0;

	for (int i = 0; i < 26; i++) {
		if (c[i] % 2 == 1) {
			oddCnt++;
			if (c[i] >= 3) {
				cnt += (c[i] - 1) / 2;
			}
		}
		else {
			cnt += c[i] / 2;
		}
	}

	if (oddCnt >= 2) {
		cout << 0 << endl;
		return 0;
	}


	long long ans = 1;
	for (long long i = cnt; i >= 1; i--) {
		ans *= i;
	}

	for (int i = 0; i < 26; i++) {
		if (c[i] >= 2) {
			long long tmp;
			if (c[i] % 2 == 1) {
				tmp = (c[i] - 1) / 2;
			}
			else {
				tmp = c[i] / 2;
			}
			for (int j = 2; j <= tmp; j++) {
				ans /= j;
			}
		}
	}

	cout << ans << endl;
}
