solve :: String -> String
solve [s] = [s]
solve (_:ss) = if a == b
               then ss
               else solve ss
  where len = length ss `div` 2
        a = take len ss
        b = drop len ss

main :: IO ()
main = do
  s <- reverse <$> getLine
  print . length $ solve s