judge :: String -> Bool
judge xs
  | s1 == s2  = True
  | otherwise = False
    where l = length xs `div` 2
          s1 = take l xs
          s2 = drop l xs

check :: String -> String
check [] = []
check xs
  | judge xs  = xs
  | otherwise = check (init $ init xs)

main = do
  str <- getLine
  let str' = if odd $ length str then init str else init $ init str
  putStrLn $ show $ length $ check str'
