main :: IO ()
main = do
  s <- getLine :: IO String
  print $ f (reverse s)

f :: String -> Int
f (x:xs) 
  | odd $ length xs = f xs 
  | otherwise = let half = length xs `div` 2 
                   in if take half xs == drop half xs 
                        then
                        half * 2 
                        else
                        f xs                              
  