import qualified Data.ByteString.Char8 as BS
import Data.Maybe (fromJust)
import Data.List

isEvenStr :: String -> Bool
isEvenStr s =
    s1 == s2
    where 
        c = (length s) `div` 2
        s1 = take c s
        s2 = drop c s

solve :: String -> Int 
solve s 
    | isEvenStr s = length s
    | otherwise = solve $ init s

main :: IO()
main = do
    s <- getLine
    print $ solve (init s)
