#include using namespace std; const int INF = 1<<30; 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 <= 'z'; ++i) { int nUse = INF; if (i == 'y') { nUse = min(nUse, cnt[i] / 2); } else { nUse = min(nUse, cnt[i]); } ans += nUse; cnt[(int)'y'] -= nUse; cnt[i] -= nUse; } for (int i = 'k' + 1; i <= 'z'; ++i) { int nUse = INF; if (i == 'y') { nUse = min(nUse, cnt[i] / 2); } else { nUse = min(nUse, cnt[i]); } if (i == 'u') { nUse = min(nUse, cnt[i] / 2); } else { nUse = min(nUse, cnt[i]); } ans += nUse; cnt[(int)'y'] -= nUse; cnt[(int)'u'] -= nUse; cnt[i] -= nUse; } for (int i = 'i' + 1; i <= 'z'; ++i) { int nUse = INF; if (i == 'y') { nUse = min(nUse, cnt[i] / 2); } else { nUse = min(nUse, cnt[i]); } if (i == 'u') { nUse = min(nUse, cnt[i] / 2); } else { nUse = min(nUse, cnt[i]); } if (i == 'k') { nUse = min(nUse, cnt[i] / 2); } else { nUse = min(nUse, cnt[i]); } ans += nUse; cnt[(int)'y'] -= nUse; cnt[(int)'u'] -= nUse; cnt[(int)'k'] -= nUse; cnt[i] -= nUse; } cout << ans << endl; } int main() { read(); work(); return 0; }