open System

let getMaxLen input =
    let isACGT char = List.contains char ['A'; 'C'; 'G'; 'T']

    let rec inner = function
    | hd :: tl when isACGT hd -> 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
