let s = read_line ()
let rec f m i c =
  if i >= String.length s then max m c
  else if String.contains "ACGT" s.[i] then f m (i + 1) (c + 1)
  else f (max m c) (i + 1) 0
let _ = Printf.printf "%d\n" @@ f 0 0 0