#include //cin, cout #include //vector #include //sort,min,max,count #include //string,getline, to_string #include //abs(int) #include //swap, pair #include //deque #include //INT_MAX #include //bitset using namespace std; int main() { int n; string s; cin >> n >> s; int cnt = 0; int ans = 0; while (1) { cnt = 0; for (int i = 0; i < n; i++) { if (s[i] == 'A' || s[i] == 'G' || s[i] == 'C' || s[i] == 'T') { cnt++; } } if (cnt == 0) { break; } s.erase(s.begin() + cnt - 1); ans++; n = n - 1; } cout << ans << endl; return 0; }