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

solve :: String -> Int
solve = length . go . reverse 
  where
    go :: String -> String
    go [] = []
    go [x] = []
    go (x:y:z)
      | check z  = z
      | otherwise = go z
    check :: String -> Bool
    check str =
      let (ls, rs) = splitAt ((length str) `div` 2) str in
        ls == rs
   
