open System.Text.RegularExpressions

let S = stdin.ReadLine()

let r = Regex("[ACGT]{1,}").Matches S

if r
   |> Seq.length = 0 then 0
else
    r
    |> Seq.map (fun x -> x.Length)
    |> Seq.max
|> stdout.WriteLine
