module ABC122.B

open System

let rec acgt cnt max_cnt lst =
    match lst with
    | [] -> max_cnt
    | 'A' :: tail -> acgt (cnt + 1) max_cnt tail
    | 'C' :: tail -> acgt (cnt + 1) max_cnt tail
    | 'G' :: tail -> acgt (cnt + 1) max_cnt tail
    | 'T' :: tail -> acgt (cnt + 1) max_cnt tail
    | _ :: tail -> acgt 0 (max cnt max_cnt) tail

[<EntryPoint>]
let main argv =
    Console.ReadLine()
    |> Seq.toList
    |> acgt 0 0
    |> printfn "%d"
    0
