// Learn more about F# at http://fsharp.org

open System

[<EntryPoint>]
let main _argv =
    let input = stdin.ReadLine()
    let chars = input.ToCharArray(0, input.Length)
    
    let acgt = [|'A'; 'C'; 'T'; 'G'|]
    
    let createRes (chars: Char[]) =
        let last = chars.Length-1
        let rec loop res cnt index =
            if index > last then
                res
            else
                if Array.IndexOf(acgt, chars.[index]) >= 0 then
                    let newCnt = cnt + 1
                    let newRes =
                        (fun i ->
                            if i > res then
                                i
                            else
                                res) newCnt
                    loop newRes newCnt (index + 1)
                else
                    loop res 0 (index + 1)
        loop 0 0 0
    
    createRes chars
    |> printfn "%d"
    0 // return an integer exit code
