import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class Main { public static void main(String[] args) { new Main().run(); } String yuki = "yuki"; void run() { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); String str = sc.next(); int abcdefgh = 0, i = 0, j = 0, k = 0, lmnopqrst = 0, u = 0, vwx = 0, y = 0, z = 0; for (int t = 0; t < str.length(); ++t) { if (str.charAt(t) - 'i' < 0) ++abcdefgh; else if (str.charAt(t) == 'i') { ++i; } else if (str.charAt(t) - 'j' == 0) ++j; else if (str.charAt(t) - 'k' == 0) ++k; else if (str.charAt(t) - 'l' >= 0 && str.charAt(t) - 't' <= 0) ++lmnopqrst; else if (str.charAt(t) - 'u' == 0) ++u; else if (str.charAt(t) - 'v' >= 0 && str.charAt(t) - 'x' <= 0) ++vwx; else if (str.charAt(t) == 'y') ++y; else if (str.charAt(t) == 'z') ++z; else { tr(str.charAt(t)); throw new AssertionError(); } } int ans = 0; while (y > 0 && u > 0 && k > 0 && i > 0 && abcdefgh > 0) { ++ans; --y; --u; --k; --i; --abcdefgh; } while (y > 0 && u > 0 && k > 0 && i >= 2) { ++ans; --y; --u; --k; i -= 2; --abcdefgh; } while (y > 0 && u > 0 && k > 0 && j > 0) { ++ans; --y; --u; --k; --i; --j; } while (y > 0 && u > 0 && k >= 2) { ++ans; --y; --u; k -= 2; } while (y > 0 && u > 0 && lmnopqrst > 0) { ++ans; --y; --u; --lmnopqrst; } while (y > 0 && u >= 2) { ++ans; --y; u -= 2; } while (y > 0 && vwx > 0) { ++ans; --y; --vwx; } while (y >= 2) { ++ans; y -= 2; } while (z > 0) { ++ans; --z; } System.out.println(ans); } void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }