#include #include #include using namespace std; int main() { int n; string s; while (cin>>n>>s) { int a[128]={}; for(char c: s) a[c]++; int res=a['z']; int Y=a['y'], U=a['u'], K=a['k'], I=a['i']; for(int i='v';Y&&i<'y';++i) { int m=min(a[i], Y); res+=m; a[i]-=m; Y-=m; } if (Y and U) { for(int i='k'+1;Y&&U&&i<'u';++i) { int m=min({a[i], Y, U}); res+=m; a[i]-=m; Y-=m; U-=m; } } if (Y and U and K) { for(int i='i'+1;Y&&U&&K&&i<'k';++i) { int m=min({a[i], Y, U, K}); res+=m; a[i]-=m; Y-=m; U-=m; K-=m; } } if (Y and U and K and I) { for(int i='a';Y&&U&&K&&I&&i<'z';++i) { int m=min({a[i], Y, U, K, I}); res+=m; a[i]-=m; Y-=m; U-=m; K-=m; I-=m; } } while (Y and U and K>1) { ++res; --Y, --U, K-=2; } while (Y and U>1) { ++res; --Y, U-=2; } while (Y>1) { ++res; Y-=2; } cout<