import           Control.Applicative
import           Control.Monad
import qualified Data.Vector                   as V

main :: IO ()
main = do
  s <- getLine

  print $ (f . init) s

f ""  = 0
f [_] = 0
f s | (odd . length) s               = (f . init) s
    | take (hl s) s == drop (hl s) s = length s
    | otherwise                      = (f . init) s
  where hl s = length s `div` 2