#include #include #include #include #include #include using namespace std; int main() { int n; string s; vector chars(255, 0); cin >> n >> s; for (int i = 0; i < n; i++) { chars[s[i]]++; } int ans = 0; int val; // yukia - yukih for (char c = 'a'; c < 'i'; c++) { val = min({chars['y'], chars['u'], chars['k'], chars['i'], chars[c]}); ans += val; chars['y'] -= val; chars['u'] -= val; chars['k'] -= val; chars['i'] -= val; chars[c] -= val; } // yukii val = min({chars['y'], chars['u'], chars['k'], chars['i'] / 2}); ans += val; chars['y'] -= val; chars['u'] -= val; chars['k'] -= val; chars['i'] -= val * 2; // yukj for (char c = 'j'; c < 'k'; c++) { val = min({chars['y'], chars['u'], chars['k'], chars[c]}); ans += val; chars['y'] -= val; chars['u'] -= val; chars['k'] -= val; chars[c] -= val; } // yukk val = min({chars['y'], chars['u'], chars['k'] / 2}); ans += val; chars['y'] -= val; chars['u'] -= val; chars['k'] -= val * 2; // yul - yut for (char c = 'l'; c < 't'; c++) { val = min({chars['y'], chars['u'], chars[c]}); ans += val; chars['y'] -= val; chars['u'] -= val; chars[c] -= val; } // yuu val = min(chars['y'], chars['u'] / 2); ans += val; chars['y'] -= val; chars['u'] -= val * 2; // yv - yx for (char c = 'v'; c < 'y'; c++) { val = min(chars['y'], chars[c]); ans += val; chars['y'] -= val; chars[c] -= val; } // yy val = chars['y'] / 2; ans += val; chars['y'] -= val * 2; // z ans += chars['z']; chars['z'] = 0; cout << ans << endl; return 0; }