solve [] = []
solve (_:s) = if check s then s else solve s

check s = let n = length s
              in if n `mod` 2 == 0
                 then take (n `div` 2) s == drop (n `div` 2) s
                 else False

main = do
  s <- reverse <$> getLine
  putStrLn $ show $ length $ solve s
  
