import std.stdio;
import std.functional;

alias memoize!(c) cm;
int c(int n, int k){
	if(k==0 || n==k) return 1;
	return cm(n-1, k) + cm(n-1, k-1);
}

int main(){
	auto s = readln;
	int[char] maji;
	foreach(i; 0..s.length-1){
		maji[s[i]]++;
	}
	bool shinu = false;
	foreach(i; maji){
		if(i%2){
			if(shinu){
				0.writeln;
				return 0;
			}
			shinu = true;
		}
	}
	int[char] anman;
	ulong total, kazoeruyatu = 1;
	foreach(i,j; maji) total += (anman[i] = j%2 ? (j-1)/2 : j/2);
	foreach(i; anman){
		kazoeruyatu *= cm(total, i);
		total -= i;
	}
	kazoeruyatu.writeln;
	return 0;
}