import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
import std.typecons;

void main() {
	auto S = readln;
	int[char] count;
	foreach (c; S) {
		if (c != '\n')
		count[c]++;
	}
	int[] data;
	int oddCount = 0;
	foreach(int co; count) {
		if (co % 2 == 1) oddCount++;
		else data ~= co / 2;
	}
	if (oddCount > 1) {
		writeln("0");
		return;
	}
	ulong evenCount = S.length - oddCount;
	if (evenCount == 0) {
		writeln("1");
		return;
	}
	//evenCount / 2???????????????????????????????????????)
	auto a = evenCount / 2;
	//data??????????????????????????§?????§?¨???????????????????
	auto combi(ulong a, ulong b) {
		auto u = 1, d = 1;
		foreach (i; 0..b) {
			u *= a;
			a--;
		}
		foreach (j; 0..b) {
			d *= b - j;
		}
		return u / d;
	}
	ulong result = 1;
	foreach (int co; data) {
		result *= combi(a, co);
		a -= co;
	}
	writeln(result);
}