#include using namespace std; using P = pair; #define test cout << "test:" const int inf = 1073741824; const long long linf = 1152921504606846976; // const int mod = 998244353; // const int mod = 1000000007; const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1}; void _main() { int n; string s; cin >> n >> s; int cnt = 0; for (int i = 0; i < n; i++) if (s[i] == 'A' or s[i] == 'G' or s[i] == 'C' or s[i] == 'T') cnt = i + 1; cout << cnt << '\n'; return; } int main() { ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(15); _main(); }