g x = if x=='A'||x=='C'||x=='G'||x=='T' then True else False
f n k (x:l)= if null l then if g x && n<(k+1) then (k+1) else n else if g x then f n (k+1) l else if n<k then f k 0 l else f n 0 l
main=getLine>>=print.f 0 0