#include using namespace std; int n, m, c; string s; bool f; bool ist(string s, int t) { return s[t] == 'A' || s[t] == 'G' || s[t] == 'C' || s[t] == 'T'; } int main() { cin >> n >> s; for (int i = 0; i < s.size(); i++) { if(ist(s, i)) c++; } while (c) { f = ist(s, c - 1); s = s.substr(0, c - 1) + s.substr(c, n - c); if (f) c--; n--; m++; } cout << m << endl; }