s = gets.chomp
count = Hash.new(0)
s.each_char do |c|
  count[c]+=1
end

odd = count.count{|c,k| k.odd? }

if odd >1
  puts 0
  exit
else
  ans = (2..(s.length/2)).inject(1,:*)
  count.each do |c,k|
    ans /= (2..(k/2)).inject(1,:*)
  end
  puts ans
end