import Data.List

main = do
  s <-getLine
  let ans = compute s
  print ans

compute :: String -> Int
compute s = head $ tail
  [ l
  | (s1,l) <- reverse $ zip (inits s) [0..]
  , even l
  , let (as,bs) = splitAt (div l 2) s1
  , as == bs
  ]
