import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  s<-getLine
  print $ sscheck s

sscheck = judge .init

judge str
  |odd (length str) = sscheck str
  |left/=right = sscheck str
  |left==right = length str
    where left  = take (div (length str) 2) str
          right = drop (div (length str) 2) str