main = do
  s <- getLine
  print $ solve s 0

ok :: [Char]
ok = ['A','T','G','C']

solve :: String -> Int -> Int
solve [] cur = cur
solve (fs:ss) cur=
  if elem fs ok
    then max cur $ solve ss (cur+1)
    else max cur $ solve ss 0
