main = getLine >>= print.f1

f1 l
  | l == [] = 0
  | otherwise = max (f2 l) (f1 $ tail l)

f2 l
  | l == [] = 0
  | (head l) == 'A' || (head l) == 'T' || (head l) == 'G' || (head l) == 'C' = (+) 1 $ f2 (tail l)
  | otherwise = 0