#include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; int main() { ll n, cnt = 0, ans = 0; string s; cin >> n >> s; for (ll i = 0; i < n; i++) { if (s[i] == 'A' || s[i] == 'T' ||s[i] == 'G' ||s[i] == 'C'){ cnt++; ans = i + 1; } } cout << ans << endl; }