main :: IO ()
main = print $ show . solve . drop 1 . reverse . getLine
 
solve :: String -> Int
solve s
    | even $ length s = solver s
    | otherwise = solver ss
        where _:ss = s
 
solver :: String -> Int
solver s = if p == q then len else solver ss
    where
        len = length s
        (p, q) = splitAt (len `div` 2) s
        _:_:ss = s