n = int(input()) s = list(input()) i = 0 while True: t = s.count("A") + s.count("G") + s.count("C") + s.count("T") if t == 0: break else: del s[t-1] i += 1 print(i)