import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); char[] arr = sc.next().toCharArray(); int total = 0; int[] counts = new int[6]; // y - u - k - for (char c : arr) { if (c > 'y') { total++; } else if (c == 'y') { counts[0]++; } else if (c > 'u') { counts[1]++; } else if (c == 'u') { counts[2]++; } else if (c > 'k') { counts[3]++; } else if (c == 'k') { counts[4]++; } else if (c > 'i') { counts[5]++; } } if (counts[4] > counts[5]) { int sum = counts[4] + counts[5]; counts[4] = sum / 2; counts[5] = sum / 2; } int cnt = Math.min(Math.min(counts[0], counts[2]), Math.min(counts[4], counts[5])); total += cnt; counts[0] -= cnt; counts[2] -= cnt; if (counts[2] > counts[3]) { int sum = counts[2] + counts[3]; counts[2] = sum / 2; counts[3] = sum / 2; } cnt = Math.min(counts[0], Math.min(counts[2], counts[3])); total += cnt; counts[0] -= cnt; if (counts[0] > counts[1]) { int sum = counts[0] + counts[1]; counts[0] = sum / 2; counts[1] = sum / 2; } cnt = Math.min(counts[0], counts[1]); total += cnt; System.out.println(total); } }