let s = read_line ()
let f s = let n = String.length s in String.sub s 0 @@ n / 2 = String.sub s (n / 2) @@ n - n / 2
let _ = for i = String.length s - 1 downto 0 do if f @@ String.sub s 0 i then (Printf.printf "%d\n" @@ i; exit 0) done