let () =
  let s = Scanf.scanf "%s" (fun s -> s) in
  Array.init (String.length s / 2) (fun i ->
    (String.sub s 0 i = String.sub s i i, 2*i))
  |> Array.fold_left (fun z (b,s) -> if b then s else z) 0
  |> Printf.printf "%d\n"
