import java.io.BufferedInputStream; import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; import java.util.*; import java.util.Map.Entry; import java.util.concurrent.ConcurrentSkipListSet; public class Main { public static final int C = 1000000007; static final int CY = 1000000000; //static boolean MAP[][]; static int K; static int N; static double P; static String S; static int M; static int MAX = -1; //static int tic[][]; static int T[][]; static int Y[]; static double W[]; //static int max; static long DP[]; static int ST[][]; //static int p[]; //static ArrayList> al; static ConcurrentSkipListSet TS; static ArrayList AL; //static int a[][]; //static char[][] ch; //static ArrayList> al; //static String a[]; //static String str; public static void main(String[] args) { StringBuilder sb = new StringBuilder(); BufferedInputStream bs = new BufferedInputStream(System.in); Scanner sc = new Scanner(bs); N = sc.nextInt(); S = sc.next(); char c[] = S.toCharArray(); Arrays.sort(c); long ans = 0; LOOP:for (int i=N-1; i >= 0; i--) { if (c[i] > 'y') { ans++; }else if (c[i] == 'y'){ int indT = -1; for (int t=i-1; t >= 0; t--) { if (c[t] == 'y') { indT = t; }else if (c[t] > 'u'){ indT = t; break; }else if (c[t] == 'u') { //TODO int indV = -1; for (int v=t-1; v >= 0; v--) { if (c[v] == 'u') { indV = v; }else if (c[v] > 'k'){ indV = v; break; }else if (c[v] == 'k') { //TODO int indN = -1; for (int n=t-1; n >= 0; n--) { if (c[n] == 'u') { indN = n; }else if (c[n] > 'k'){ indN = n; break; }else if (c[n] != 0){ break; } } if (indN != -1) { c[indN] = 0; //ans++; }else { break LOOP; } }else if (c[v] != 0){ break; } } if (indV != -1) { c[indV] = 0; //ans++; }else { break LOOP; } }else if (c[t] != 0){ break ; } } if (indT != -1) { c[indT] = 0; ans++; }else { break LOOP; } }else if (c[i] != 0){ break; } } System.out.println(ans); } }