let () =
  Scanf.scanf "%s" @@ fun s ->
  let s = Array.init (String.length s) (fun i -> s.[i]) in
  Array.fold_left (fun (u, v) c ->
    match c with
    | 'A' | 'C' | 'G' | 'T' -> (max u (v+1), v+1)
    | _ -> (u, 0)) (0, 0) s
  |> fst |> Printf.printf "%d\n"
     
