use std::io; fn main() { let mut nn = String::new(); io::stdin().read_line(&mut nn); let n = match nn.trim().parse() { Ok(num) => num, Err(_) => 0 }; let mut ss = String::new(); io::stdin().read_line(&mut ss); let s: Vec = ss.chars().collect(); let mut ans = 0; for i in 0..n { let c = s[i]; if c == 'A' || c == 'G' || c == 'C' || c == 'T' { ans = i + 1; } } println!("{}", ans); }