def f(n)
  if n==0
    return 1
  end
  return n*f(n-1)
end

cs = gets.chomp.split("")
cc = Hash.new(0)
cs.each do |c|
  cc[c]+=1
end
if cs.size.even?
  if cc.values.all?{|c| c.even?}
    puts f(cs.size/2)/cc.values.map{|c|f(c/2)}.inject(1){|x,y|x*y}
  else
    puts 0
  end
else
  if cc.values.one?{|c| c.odd?}
    puts f(cs.size/2)/cc.values.map{|c|f(c/2)}.inject(1){|x,y|x*y}
  else
    puts 0
  end
end