import Data.List

main = do
  s <- getLine
  let
    f [] t = [t]
    f s t = concat [f (tail s) (head s : t), f (init s) (last s : t)]
    c = length . nub $ f s ""
   in print c