
a=Array.new(21,1)
(2..20).each{|i| a[i]=a[i-1]*i}

b=Array.new(26,0)
s=gets.chomp
s.bytes{|p| b[p-97]+=1}

c=s.length&1==0
p b.inject(a[s.length/2]){|pi,p|
  if p&1==1
    break 0 if c
    c=true
  end
  pi/a[p/2]
}