let () =
  let s = read_line () in
  Array.init (String.length s / 2) (fun i -> i)
  |> Array.to_list
  |> List.filter (fun i ->
      String.sub s 0 i = String.sub s i i)
  |> List.fold_left max 0
  |> ( * ) 2
  |> Printf.printf "%d\n"

