readLine()! let s = readLine()!.map{String($0)} let As: Set = ["A","G","C","T"] var c = 0 for i in s{ if As.contains(i){ c += 1 } } var k = c, cnt = 0 c = c-1 while c >= 0 { if !As.contains(s[c]){ while !As.contains(s[k]){ k += 1 cnt += 1 } k += 1 cnt += 1 } c -= 1 cnt += 1 } print(cnt)