#include #include using namespace std; string s; void read() { int n; cin >> n >> s; } void work() { int cnt[128] = {}; for (int i = 0; i < s.size(); ++i) ++cnt[(int)s[i]]; int ans = 0; for (int i = 'y' + 1; i <= 'z'; ++i) { int nUse = cnt[i]; ans += nUse; cnt[i] -= nUse; } for (int i = 'u' + 1; i < 'y'; ++i) { int nUse = min(cnt[(int)'y'], cnt[i]); ans += nUse; cnt[(int)'y'] -= nUse; cnt[i] -= nUse; } for (int i = 'k' + 1; i < 'u'; ++i) { int nUse = min(min(cnt[(int)'y'], cnt[(int)'u']), cnt[i]); ans += nUse; cnt[(int)'y'] -= nUse; cnt[(int)'u'] -= nUse; cnt[i] -= nUse; } for (int i = 'i' + 1; i < 'k'; ++i) { int nUse = min(min(min(cnt[(int)'y'], cnt[(int)'u']), cnt[(int)'k']), cnt[i]); ans += nUse; cnt[(int)'y'] -= nUse; cnt[(int)'u'] -= nUse; cnt[(int)'k'] -= nUse; cnt[i] -= nUse; } int nUse; // yukk nUse = min(min(cnt[(int)'y'], cnt[(int)'u']), cnt[(int)'k'] / 2); ans += nUse; cnt[(int)'y'] -= nUse; cnt[(int)'u'] -= nUse; cnt[(int)'k'] -= nUse * 2; // yuu nUse = min(cnt[(int)'y'], cnt[(int)'u'] / 2); ans += nUse; cnt[(int)'y'] -= nUse; cnt[(int)'u'] -= nUse * 2; // yy nUse = cnt[(int)'y'] / 2; ans += nUse; cnt[(int)'y'] -= nUse * 2; cout << ans << endl; } int main() { read(); work(); return 0; }