main = do
  s <-  getLine
  putStrLn .show $ solve s

solve s = solve' $ take (length s - 2) s

solve':: String -> Int
solve' s
  | ff == bb = l
  | otherwise = solve' $ take (l - 2) s
  where
    l = length s
    ff = take (div l 2) s
    bb = drop (div l 2) s