using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var s = Console.ReadLine().ToList(); var count = 0; var times = 0; for (int i = 0; i < s.Count; i++) { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') count++; } while (count != 0) { if (s[count - 1] == 'A' || s[count - 1] == 'C' || s[count - 1] == 'G' || s[count - 1] == 'T') { s.RemoveAt(count - 1); times++; count--; } else { s.RemoveAt(count - 1); times++; } } Console.WriteLine(times); } }