
answer::String->Int
answer (x:xs) | length xs == 0 = 0
              | x == 'A' || x == 'T' || x == 'C' || x == 'G' = 1 + answer xs
              | otherwise = answer xs

main = do
  s <- getLine
  print $ answer s