#include #include #include #include #include #define rep(i,n) for(i=0; i> a #define out(a,b) cout << a << b using namespace std; using lint = long long; int main(void){ int i, j, n, m, k, cnt = 0; string s, u="AGCT"; in(n); in(s); rep(i,n){ rep(j,4){ if(s[i]==u[j]) cnt=i+1; } } out(cnt,endl); return 0; }