import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String s = sc.next(); List sList = new ArrayList<>(); List yukiList = new ArrayList<>(); yukiList.add('y'); yukiList.add('u'); yukiList.add('k'); yukiList.add('i'); int yCountup = 0; int yCount = 0; int uCountup = 0; int uCount = 0; int kCountup = 0; int kCount = 0; int iCount = 0; for (int i = 0; i < n; i++) { sList.add(s.charAt(i)); if (sList.get(i) > 'y') { yCountup++; } else if(sList.get(i) == 'y') { yCount++; } else if (sList.get(i) > 'u') { uCountup++; } else if(sList.get(i) == 'u') { uCount++; } else if (sList.get(i) > 'k') { kCountup++; } else if(sList.get(i) == 'k') { kCount++; } else if (sList.get(i) > 'i') { iCount++; } } int luck = 0; luck += yCountup; for (int i = 1; i <= yCount; i++) { if (yCount-- > 0) { luck++; continue; } if (uCountup-- > 0 ) { luck++; continue; } if (uCount-- > 0) { if (kCountup > 0) { kCountup--; luck++; continue; } if (kCount > 0) { kCount--; if (iCount > 0) { iCount--; luck++; continue; } if (kCount > 0) { kCount--; luck++; continue; } } if (uCount-- > 0) { luck++; } } } System.out.println(luck); } }