import qualified Data.ByteString.Char8 as C
f s
  | even n && t == u = n
  | otherwise = f (C.init s) 
  where 
    n = C.length s
    (t,u) = C.splitAt (n`div`2) s
main = do
  s <- getLine
  print $ f (C.init $ C.pack s)