let () =
  let s = read_line () in
  let ls = String.length s in
  let rec iter l =
    if String.sub s 0 (l/2) = String.sub s (l/2) (l/2) then l
    else iter (l-2) in
  iter (ls-2) |> string_of_int |> print_endline
