import Prelude
import Data.List
import Control.Monad

evenstring :: String -> Bool
evenstring s
    |even (length s) == False = False
    |otherwise = s == shalf ++ shalf
    where shalf = take ((length s) `div` 2) s

solverpre :: String ->[Int]-> [Int]
solverpre [] log = log
solverpre s log
    |evenstring s = solverpre (drop 1 s) ((length s):log)
    |otherwise = solverpre (drop 1 s) log

solver s = minimum $ solverpre (reverse s) []

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

