open System

let getMaxLen input =
    let rec inner = function
    | 'A' :: tl
    | 'C' :: tl
    | 'G' :: tl
    | 'T' :: tl -> 1 + (inner tl)
    | _ :: _ -> 0
    | [] -> 0

    let rec outer = function 
    | hd :: tl -> max (inner <| hd :: tl) (outer tl)
    | [] -> 0

    outer <| Seq.toList input

let input = Console.ReadLine()
printfn "%i" <| getMaxLen input
