'use strict';
function Main(input) {
    input = input.split("\n");
    let tmp = input[0].split("");

    let A = tmp.reduce((a, x) => {
        if (x == "A" || x == "C" || x == "G" || x == "T") {
            return a+1;
        }
        return a;
    },0);
    console.log(A);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));