using System; using System.Linq; class Program { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var s = Console.ReadLine().ToList(); var index = s.FindLastIndex(x => x == 'A' || x == 'C' || x == 'G' || x == 'T'); Console.WriteLine(index+1); } }