-- Question B

import Control.Applicative
import Control.Monad

main = do
  ys <- getLine
  putStrLn $ show ( check (length ys) (length ys) ys)


check :: Int -> Int -> String -> Int
check n k xs 
 | n == k = check (n-2) k (init (init xs))
 | take (n `div` 2) xs == drop (n `div` 2)  xs = length xs
 | otherwise = check (n-2) k (init (init xs))