#define _USE_MATH_DEFINES #include #include #include #include #include #include //#include #include #include #include #include #include #include ///////// #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define P(p) cout<<(p)< ///////// typedef long long LL; typedef long double LD; ///////// using namespace::std; ///////// int num[512]; int main(void){ std::cin.tie(0); std::ios::sync_with_stdio(false); std::cout << std::fixed;// cout << setprecision(16);// int N; string str; cin>>N>>str; rep(i,512){ num[i] = 0; } rep(i,N){ ++num[ str[i] ]; } int ans = 0; //z ans += num['z']; num['z'] = 0; //yv int it = 'u' + 1; for(;num['y'] && it < 'y';++it){ if( num[it] >= num['y'] ){ ans += num['y']; num[it] -= num['y']; num['y'] = 0; }else{ ans += num[it]; num['y'] -= num[it]; num[it] = 0; } } //yul it = 'k'+1; int minel = min(num['y'],num['u']); for(;minel > 0 && it < 'y';++it ){ if(it == 'u')continue; if( num[it] >= minel ){ ans += minel; num['y'] -= minel; num['u'] -= minel; num[it] -= minel; minel = 0; }else{ ans += num[it]; num['y'] -= num[it]; num['u'] -= num[it]; minel -= num[it]; num[it] = 0; } } //yukj it = 'i'+1; minel = min( min(num['y'],num['u']),num['k'] ); for(;minel > 0 && it < 'y';++it){ if( it == 'u' || it == 'k')continue; if( num[it] >= minel ){ ans += minel; num['y'] -= minel; num['u'] -= minel; num['k'] -= minel; num[it] -= minel; minel = 0; }else{ ans += num[it]; num['y'] -= num[it]; num['u'] -= num[it]; num['k'] -= num[it]; minel -= num[it]; num[it] = 0; } } //yuki.* it = 'a'; minel = min( min(num['y'],num['u']),min(num['k'],num['i']) ); for(;minel > 0 && it < 'y';++it){ if( it == 'u' || it == 'k' || it == 'i')continue; if(num[it] >= minel ){ ans += minel; num['y'] -= minel; num['u'] -= minel; num['k'] -= minel; num['i'] -= minel; num[it] -= minel; minel = 0; }else{ ans += num[it]; num['y'] -= num[it]; num['u'] -= num[it]; num['k'] -= num[it]; num['i'] -= num[it]; minel -= num[it]; num[it] = 0; } } //yukk minel = min( min(num['y'],num['u']) ,num['k']/2 ); ans += minel; num['y'] -= minel; num['u'] -= minel; num['k'] -= minel*2; //yuu minel = min( num['y'],num['u']/2); ans += minel; num['y'] -= minel; num['u'] -= 2*minel; //yy ans += num['y']/2; num['y'] = num['y']%2; P(ans); return 0; }