{-# LANGUAGE BangPatterns, TupleSections #-}
import qualified Data.ByteString.Char8 as BS

main :: IO ()
main = do
  str <- BS.getLine
  print $ (\(!cur,!tot) -> tot)
   $ BS.foldl'
     (\(!prev,!tot) !chr ->
       let now = if chr `elem` "ACGT" then prev + 1 else 0
       in (now,) $! now `max` tot)
     (0,0) str
