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